From c2833b10c40d9ade38f5548ae97e9323bb948010 Mon Sep 17 00:00:00 2001 From: stiffly Date: Wed, 3 Feb 2016 15:55:32 +0100 Subject: [PATCH] Hard coded (read retarded) improvements added to player walk logic --- src/Engine/Sound/SoundSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Engine/Sound/SoundSystem.cpp b/src/Engine/Sound/SoundSystem.cpp index ab4c5fce..86f3a34b 100644 --- a/src/Engine/Sound/SoundSystem.cpp +++ b/src/Engine/Sound/SoundSystem.cpp @@ -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(playerSpeed, 2) > m_PlayerFootstepInterval) { // Create footstep sound EntityID child = m_World->CreateEntity(m_LocalPlayer); m_World->AttachComponent(child, "Transform");