From de3b03cc80d88b1b1f9819770787a4dcf9bb49b3 Mon Sep 17 00:00:00 2001 From: auria Date: Wed, 11 Jan 2012 02:54:55 +0000 Subject: [PATCH] Use right sound when crossing force field git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10647 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/controller/player_controller.cpp | 3 +++ src/tracks/track_object.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/karts/controller/player_controller.cpp b/src/karts/controller/player_controller.cpp index 2aed4b9ea..c9689d876 100644 --- a/src/karts/controller/player_controller.cpp +++ b/src/karts/controller/player_controller.cpp @@ -444,6 +444,9 @@ void PlayerController::collectedItem(const Item &item, int add_info, float old_e //See Kart::collectedItem() m_ugh_sound->play(); break; + case Item::ITEM_TRIGGER: + // no default sound for triggers + break; default: m_grab_sound->play(); break; diff --git a/src/tracks/track_object.cpp b/src/tracks/track_object.cpp index d22c38adb..e9f557fea 100644 --- a/src/tracks/track_object.cpp +++ b/src/tracks/track_object.cpp @@ -291,7 +291,7 @@ void TrackObject::update(float dt) /** Implement callback from TriggerItemListener. Not used by all track objects. */ void TrackObject::onTriggerItemApproached(Item* who) { - if (m_sound != NULL && m_sound->getStatus() == SFXManager::SFX_STOPPED) + if (m_sound != NULL && m_sound->getStatus() != SFXManager::SFX_PLAYING) { m_sound->play(); }