From d99ee866f86fa82bf925204e103065744a50c275 Mon Sep 17 00:00:00 2001 From: auria Date: Mon, 14 Mar 2011 20:53:50 +0000 Subject: [PATCH] No particles during rescue git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7892 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/emergency_animation.hpp | 2 +- src/karts/kart.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/karts/emergency_animation.hpp b/src/karts/emergency_animation.hpp index 8f72cf4a6..8d9cd3e06 100644 --- a/src/karts/emergency_animation.hpp +++ b/src/karts/emergency_animation.hpp @@ -40,7 +40,7 @@ class Stars; */ class EmergencyAnimation: public NoCopy { -private: +protected: /** The coordinates where the kart was hit originally. */ Vec3 m_xyz; diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 6d99b9ed2..89d731ab5 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -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;