Fixed machine gun effect when riding on zipper ramps
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6576 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
fb4862afd9
commit
2df77fbc5e
@ -54,23 +54,23 @@ public:
|
||||
*/
|
||||
enum CustomSFX
|
||||
{
|
||||
CUSTOM_HORN, // Replaces default horn
|
||||
CUSTOM_CRASH, // Played when colliding with another kart
|
||||
CUSTOM_WIN, // Played when racer wins
|
||||
CUSTOM_EXPLODE, // Played when struck by bowling ball or dynamite
|
||||
CUSTOM_GOO, // Played when driving through goo
|
||||
CUSTOM_PASS, // Played when passing another kart
|
||||
CUSTOM_ZIPPER, // Played when kart hits zipper
|
||||
CUSTOM_NAME, // Introduction "I'm Tux!"
|
||||
CUSTOM_ATTACH, // Played when something is attached to kart (Uh-Oh)
|
||||
CUSTOM_SHOOT, // Played when weapon is used
|
||||
CUSTOM_HORN, //!< Replaces default horn
|
||||
CUSTOM_CRASH, //!< Played when colliding with another kart
|
||||
CUSTOM_WIN, //!< Played when racer wins
|
||||
CUSTOM_EXPLODE, //!< Played when struck by bowling ball or dynamite
|
||||
CUSTOM_GOO, //!< Played when driving through goo
|
||||
CUSTOM_PASS, //!< Played when passing another kart
|
||||
CUSTOM_ZIPPER, //!< Played when kart hits zipper
|
||||
CUSTOM_NAME, //!< Introduction (e.g. "I'm Tux!")
|
||||
CUSTOM_ATTACH, //!< Played when something is attached to kart (Uh-Oh)
|
||||
CUSTOM_SHOOT, //!< Played when weapon is used
|
||||
NUM_CUSTOMS
|
||||
};
|
||||
|
||||
/** Status of a sound effect. */
|
||||
enum SFXStatus
|
||||
{
|
||||
SFX_UNKNOWN = -1, SFX_STOPED = 0, SFX_PAUSED = 1, SFX_PLAYING = 2,
|
||||
SFX_UNKNOWN = -1, SFX_STOPPED = 0, SFX_PAUSED = 1, SFX_PLAYING = 2,
|
||||
SFX_INITIAL = 3
|
||||
};
|
||||
|
||||
|
@ -237,7 +237,7 @@ SFXManager::SFXStatus SFXOpenAL::getStatus()
|
||||
alGetSourcei(m_soundSource, AL_SOURCE_STATE, &state);
|
||||
switch(state)
|
||||
{
|
||||
case AL_STOPPED: return SFXManager::SFX_STOPED;
|
||||
case AL_STOPPED: return SFXManager::SFX_STOPPED;
|
||||
case AL_PLAYING: return SFXManager::SFX_PLAYING;
|
||||
case AL_PAUSED: return SFXManager::SFX_PAUSED;
|
||||
case AL_INITIAL: return SFXManager::SFX_INITIAL;
|
||||
|
@ -209,7 +209,7 @@ void Material::initCustomSFX(const XMLNode *sfx)
|
||||
*/
|
||||
void Material::setSFXSpeed(SFXBase *sfx, float speed) const
|
||||
{
|
||||
if(sfx->getStatus()==SFXManager::SFX_STOPED)
|
||||
if(sfx->getStatus()==SFXManager::SFX_STOPPED)
|
||||
{
|
||||
if(speed<m_sfx_min_speed) return;
|
||||
sfx->play();
|
||||
|
@ -369,7 +369,10 @@ void PlayerController::finishedRace(float time)
|
||||
*/
|
||||
void PlayerController::handleZipper()
|
||||
{
|
||||
m_wee_sound->play();
|
||||
if (m_wee_sound->getStatus() != SFXManager::SFX_PLAYING)
|
||||
{
|
||||
m_wee_sound->play();
|
||||
}
|
||||
} // handleZipper
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -832,7 +832,7 @@ void Kart::update(float dt)
|
||||
m_terrain_sound = NULL;
|
||||
}
|
||||
if(m_previous_terrain_sound &&
|
||||
m_previous_terrain_sound->getStatus()==SFXManager::SFX_STOPED)
|
||||
m_previous_terrain_sound->getStatus()==SFXManager::SFX_STOPPED)
|
||||
{
|
||||
// We don't modify the position of m_previous_terrain_sound
|
||||
// anymore, so that it keeps on playing at the place where the
|
||||
|
Loading…
Reference in New Issue
Block a user