Hard coded (read retarded) improvements added to player walk logic

This commit is contained in:
stiffly
2016-02-03 15:55:32 +01:00
parent 938caa6ba2
commit c2833b10c4
+1 -1
View File
@@ -220,7 +220,7 @@ void SoundSystem::playerStep(double dt)
bool isAirborne = vel.y != 0;
if (playerSpeed > 1 && !isAirborne) {
// Player is walking
if (m_TimeSinceLastFootstep * playerSpeed > m_PlayerFootstepInterval) {
if (m_TimeSinceLastFootstep * std::min<float>(playerSpeed, 2) > m_PlayerFootstepInterval) {
// Create footstep sound
EntityID child = m_World->CreateEntity(m_LocalPlayer);
m_World->AttachComponent(child, "Transform");