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
This commit is contained in:
hikerstk 2010-06-22 06:17:29 +00:00
parent 52051658b8
commit d3020e44ce

View File

@ -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