From be33dfbd696b0b25784ceefe3d010144b6265e48 Mon Sep 17 00:00:00 2001 From: stiffly Date: Fri, 15 Jan 2016 16:10:02 +0100 Subject: [PATCH] Forgot to change the velocity for the emitters as well... --- 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 f1f90b18..1292e0b1 100644 --- a/src/Engine/Sound/SoundSystem.cpp +++ b/src/Engine/Sound/SoundSystem.cpp @@ -112,7 +112,7 @@ void SoundSystem::updateEmitters(double dt) // Get next pos glm::vec3 nextPos = Transform::AbsolutePosition(m_World, it->first); // Calculate velocity - glm::vec3 velocity = nextPos - previousPos; + glm::vec3 velocity = glm::vec3(nextPos - previousPos) / (float)dt; setSourcePos(it->second->ALsource, nextPos); setSourceVel(it->second->ALsource, velocity); float gain;