From d3020e44cebfd3ed8fcdf070874c8678db59a83a Mon Sep 17 00:00:00 2001 From: hikerstk Date: Tue, 22 Jun 2010 06:17:29 +0000 Subject: [PATCH] Fixed incorrect position of terrain-specific sfx (though I still do not get positional sfx atm, but that might be a different issue??). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5533 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/kart.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index e84540034..dbd7df1d1 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -760,14 +760,17 @@ void Kart::update(float dt) if(s!="") { m_terrain_sound = sfx_manager->createSoundSource(s); - m_terrain_sound->position(getXYZ()); m_terrain_sound->play(); m_terrain_sound->loop(); } else m_terrain_sound = NULL; } - if(m_terrain_sound) material->setSFXSpeed(m_terrain_sound, m_speed); + if(m_terrain_sound) + { + m_terrain_sound->position(getXYZ()); + material->setSFXSpeed(m_terrain_sound, m_speed); + } m_last_material = material; // Sometimes the material can be 0. This can happen if a kart is above