No particles during rescue

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7892 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-03-14 20:53:50 +00:00
parent 70b4c58b5c
commit d99ee866f8
2 changed files with 5 additions and 4 deletions

View File

@ -40,7 +40,7 @@ class Stars;
*/
class EmergencyAnimation: public NoCopy
{
private:
protected:
/** The coordinates where the kart was hit originally. */
Vec3 m_xyz;

View File

@ -982,7 +982,7 @@ void Kart::handleMaterialGFX()
// on top of a surface (i.e. not falling), actually touching
// something with the wheels, and the material has not the
// below surface property set.
if(material && isOnGround() && !material->isBelowSurface())
if(material && isOnGround() && !material->isBelowSurface() && m_kart_mode != EA_RESCUE)
{
Vec3 xyz;
m_wheel_toggle = 1 - m_wheel_toggle;
@ -1050,7 +1050,7 @@ void Kart::handleMaterialGFX()
}
const ParticleKind *pk =
surface_material->getParticlesWhen(Material::EMIT_ON_DRIVE);
if(pk && !m_flying)
if(pk && !m_flying && m_kart_mode != EA_RESCUE)
{
const float distance = xyz.distance2(from);
m_terrain_particles->setParticleType(pk);
@ -1076,7 +1076,8 @@ void Kart::handleMaterialGFX()
const std::string s = surface_material->getSFXName();
if (s != "" && (m_terrain_sound == NULL || m_terrain_sound->getStatus() == SFXManager::SFX_STOPPED))
if (s != "" && m_kart_mode != EA_RESCUE &&
(m_terrain_sound == NULL || m_terrain_sound->getStatus() == SFXManager::SFX_STOPPED))
{
if (m_previous_terrain_sound) sfx_manager->deleteSFX(m_previous_terrain_sound);
m_previous_terrain_sound = m_terrain_sound;