Added sound effect to using the Swapper powerup
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4723 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
965381bc46
commit
2f1c755596
@ -142,6 +142,8 @@ void SFXManager::loadSfx()
|
||||
loadSingleSfx(lisp, "full", SOUND_FULL );
|
||||
loadSingleSfx(lisp, "prestart", SOUND_PRESTART );
|
||||
loadSingleSfx(lisp, "start", SOUND_START );
|
||||
loadSingleSfx(lisp, "swap", SOUND_SWAP );
|
||||
|
||||
loadSingleSfx(lisp, "engine_small", SOUND_ENGINE_SMALL );
|
||||
loadSingleSfx(lisp, "engine_large", SOUND_ENGINE_LARGE );
|
||||
} // loadSfx
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
SOUND_UGH, SOUND_SKID, SOUND_BOWLING_ROLL, SOUND_BOWLING_STRIKE, SOUND_WINNER, SOUND_CRASH, SOUND_GRAB,
|
||||
SOUND_SHOT, SOUND_GOO, SOUND_WEE, SOUND_EXPLOSION, SOUND_BZZT, SOUND_BEEP, SOUND_BACK_MENU, SOUND_USE_ANVIL,
|
||||
SOUND_USE_PARACHUTE, SOUND_SELECT_MENU, SOUND_MOVE_MENU, SOUND_FULL, SOUND_LOCKED,
|
||||
SOUND_PRESTART, SOUND_START, SOUND_ENGINE_SMALL, SOUND_ENGINE_LARGE,
|
||||
SOUND_PRESTART, SOUND_START, SOUND_ENGINE_SMALL, SOUND_ENGINE_LARGE, SOUND_SWAP,
|
||||
NUM_SOUNDS
|
||||
};
|
||||
|
||||
|
@ -96,6 +96,10 @@ void Powerup::set(PowerupType type, int n)
|
||||
m_sound_use = sfx_manager->newSFX(SFXManager::SOUND_GOO);
|
||||
break ;
|
||||
|
||||
case POWERUP_SWITCH:
|
||||
m_sound_use = sfx_manager->newSFX(SFXManager::SOUND_SWAP);
|
||||
break;
|
||||
|
||||
case POWERUP_NOTHING:
|
||||
case POWERUP_CAKE:
|
||||
case POWERUP_PLUNGER:
|
||||
@ -121,7 +125,12 @@ void Powerup::use()
|
||||
if (m_type != POWERUP_NOTHING && m_type != POWERUP_ZIPPER) m_owner->playCustomSFX(SFXManager::CUSTOM_SHOOT);
|
||||
|
||||
// FIXME - for some collectibles, set() is never called
|
||||
if(m_sound_use == NULL) m_sound_use = sfx_manager->newSFX(SFXManager::SOUND_SHOT);
|
||||
if(m_sound_use == NULL)
|
||||
{
|
||||
//if (m_type == POWERUP_SWITCH) m_sound_use = sfx_manager->newSFX(SFXManager::SOUND_SWAP);
|
||||
//else
|
||||
m_sound_use = sfx_manager->newSFX(SFXManager::SOUND_SHOT);
|
||||
}
|
||||
|
||||
m_number--;
|
||||
World *world = World::getWorld();
|
||||
@ -131,6 +140,8 @@ void Powerup::use()
|
||||
break ;
|
||||
case POWERUP_SWITCH:
|
||||
item_manager->switchItems();
|
||||
m_sound_use->position(m_owner->getXYZ());
|
||||
m_sound_use->play();
|
||||
break;
|
||||
case POWERUP_CAKE:
|
||||
case POWERUP_BOWLING:
|
||||
|
Loading…
x
Reference in New Issue
Block a user