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
This commit is contained in:
auria 2012-01-11 02:54:55 +00:00
parent 72b409344e
commit de3b03cc80
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -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();
}