Commit c67dd902 authored by 魔大农's avatar 魔大农

Removed obsolete function

parent 682e6dd3
......@@ -32,7 +32,7 @@ Makefile*
# Urho3D
/Urho3D
Quatter
quatter
# Blender
......
......@@ -86,7 +86,7 @@ void EffectMaster::ArchTo(Node* node, Vector3 pos, Quaternion rot, float archHei
for (int i{0}; i < WAYPOINTS - 1; ++i){
float t{static_cast<float>(i) / WAYPOINTS};
float t2 = 0.5f * (t + (0.5f + 0.5f * pow(2.0f * (t - 0.5f), 3.0f)));
posAnim->SetKeyFrame(delay + duration * t2,
posAnim->SetKeyFrame(delay + (duration * t2),
node->GetPosition().Lerp(pos, t) + archHeight * Vector3::UP * Arch(t));
}
posAnim->SetKeyFrame(delay + duration, pos);
......
......@@ -452,7 +452,7 @@ bool InputMaster::CorrectJoystickId(int joystickId)
}
JoystickState* InputMaster::GetActiveJoystick()
{
if (MultipleJoysticks()) {
if (INPUT->GetNumJoysticks() > 1) {
if (MC->InPlayer1State())
{
......@@ -481,10 +481,6 @@ JoystickState* InputMaster::GetActiveJoystick()
}
return nullptr;
}
bool InputMaster::MultipleJoysticks()
{
return INPUT->GetJoystickByIndex(0) && INPUT->GetJoystickByIndex(1);
}
void InputMaster::HandleJoystickButtonDown(StringHash eventType, VariantMap &eventData)
{ (void)eventType;
......@@ -492,7 +488,9 @@ void InputMaster::HandleJoystickButtonDown(StringHash eventType, VariantMap &eve
int joystickId{eventData[P_JOYSTICKID].GetInt()};
int button{eventData[P_BUTTON].GetInt()};
if (MultipleJoysticks() && !CorrectJoystickId(joystickId) && MC->GetGameState() != GameState::QUATTER) return;
if (INPUT->GetNumJoysticks() > 1
&& !CorrectJoystickId(joystickId)
&& MC->GetGameState() != GameState::QUATTER) return;
pressedJoystickButtons_[joystickId].Insert(button);
}
......
......@@ -101,7 +101,6 @@ private:
void HandleMouseWheel(StringHash eventType, VariantMap& eventData);
JoystickState* GetActiveJoystick();
bool MultipleJoysticks();
void HandleJoystickButtonDown(StringHash eventType, VariantMap &eventData);
void HandleJoystickButtonUp(StringHash eventType, VariantMap &eventData);
void HandleJoystickButtons();
......
......@@ -22,6 +22,7 @@
#include "quattercam.h"
#include "board.h"
#include <Urho3D/Graphics/Texture2D.h>
#include <Urho3D/Graphics/Terrain.h>
URHO3D_DEFINE_APPLICATION_MAIN(MasterControl);
......@@ -196,8 +197,7 @@ Sound* MasterControl::GetMusic(String name) const {
song->SetLooped(true);
return song;
}
Sound*MasterControl::GetSample(String name) const {
Sound* MasterControl::GetSample(String name) const {
Sound* sample{CACHE->GetResource<Sound>("Samples/"+name+".ogg")};
sample->SetLooped(false);
return sample;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment