No longer needs this walk logic in SoundSystem

This commit is contained in:
stiffly
2016-02-08 16:21:49 +01:00
parent 6f163bf3a3
commit 7752832ce5
2 changed files with 2 additions and 21 deletions
-10
View File
@@ -40,16 +40,6 @@ private:
// Helper function // Helper function
EntityID createChildEmitter(EntityWrapper parent); EntityID createChildEmitter(EntityWrapper parent);
// Walking logic
// Keeps track of how far the player has walked within this "key press session".
float m_DistanceMoved = 0.0f;
// How far a step is (How often the step sound will be played).
const float m_PlayerStepLength = 1.75f;
// To get a difference when calculating the walking state.
glm::vec3 m_LastPosition = glm::vec3();
// Determine what sound file to play.
bool m_LeftFoot = false;
std::default_random_engine generator; std::default_random_engine generator;
EventRelay<SoundSystem, Events::PlayerSpawned> m_EPlayerSpawned; EventRelay<SoundSystem, Events::PlayerSpawned> m_EPlayerSpawned;
+1 -10
View File
@@ -18,9 +18,7 @@ SoundSystem::SoundSystem(World* world, EventBroker* eventbroker)
} }
void SoundSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cComponent, double dt) void SoundSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cComponent, double dt)
{ { }
}
void SoundSystem::Update(double dt) void SoundSystem::Update(double dt)
{ } { }
@@ -52,13 +50,6 @@ bool SoundSystem::OnInputCommand(const Events::InputCommand & e)
return true; return true;
} }
} }
if (e.Command == "Forward" || e.Command == "Right") {
if (e.Value == 0) {
// Key released
// Reset the distance moved (player walk logic)
m_DistanceMoved = 0.f;
}
}
if (e.Command == "TakeDamage" && e.Value > 0) { if (e.Command == "TakeDamage" && e.Value > 0) {
Events::PlayerDamage ev; Events::PlayerDamage ev;
ev.Player = m_LocalPlayer; ev.Player = m_LocalPlayer;