This commit is contained in:
parent
49d44deb74
commit
08027943d1
7 changed files with 66 additions and 0 deletions
|
@ -115,6 +115,13 @@ void CNpcSkullStomperEnemy::processClose( int _frames )
|
|||
{
|
||||
// colliding with ground
|
||||
|
||||
if( m_soundId != NOT_PLAYING )
|
||||
{
|
||||
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||
}
|
||||
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__FALLING_ROCK_LAND, true );
|
||||
|
||||
Pos.vy += groundHeight;
|
||||
|
||||
// pause and change direction
|
||||
|
|
|
@ -91,6 +91,11 @@ void CNpcCollapsingBubblePlatform::processLifetime( int _frames )
|
|||
{
|
||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||
m_pop = true;
|
||||
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||
}
|
||||
}
|
||||
else if ( m_lifetime <= ( GameState::getOneSecondInFrames() >> 1 ) )
|
||||
{
|
||||
|
|
|
@ -59,6 +59,11 @@ void CNpcGeyserBubblePlatform::processMovement( int _frames )
|
|||
{
|
||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||
m_pop = true;
|
||||
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -67,6 +72,11 @@ void CNpcGeyserBubblePlatform::processMovement( int _frames )
|
|||
{
|
||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||
m_pop = true;
|
||||
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,11 @@ void CNpcPlayerBubblePlatform::processLifetime( int _frames )
|
|||
{
|
||||
m_pop = true;
|
||||
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_BALLOON_POP, true );
|
||||
}
|
||||
|
||||
m_lifetime = GameState::getOneSecondInFrames() >> 2;
|
||||
}
|
||||
else if ( m_lifetime <= ( GameState::getOneSecondInFrames() >> 1 ) )
|
||||
|
|
|
@ -379,6 +379,8 @@ void CPlayerModeJellyLauncher::launchProjectile()
|
|||
int fireHeading;
|
||||
CPlayerProjectile *projectile;
|
||||
|
||||
CSoundMediator::playSfx(CSoundMediator::SFX_JELLY_LAUNCHER);
|
||||
|
||||
playerFacing=m_player->getFacing();
|
||||
launchPos=getPlayerPos();
|
||||
launchPos.vx+=playerFacing*jellyLaunchPos.vx;
|
||||
|
|
|
@ -22,6 +22,39 @@
|
|||
#include "fx\fxsteam.h"
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CSteamEmitterTrigger::init()
|
||||
{
|
||||
CTrigger::init();
|
||||
|
||||
m_soundId = (int) NOT_PLAYING;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CSteamEmitterTrigger::think(int _frames)
|
||||
{
|
||||
if ( m_soundId == NOT_PLAYING )
|
||||
{
|
||||
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STEAM, true );
|
||||
}
|
||||
|
||||
CTrigger::think( _frames );
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CSteamEmitterTrigger::shutdown()
|
||||
{
|
||||
if ( m_soundId != NOT_PLAYING )
|
||||
{
|
||||
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
|
||||
}
|
||||
|
||||
CTrigger::shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CSteamEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||
|
|
|
@ -43,9 +43,13 @@
|
|||
class CSteamEmitterTrigger : public CTrigger
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void think(int _frames);
|
||||
void shutdown();
|
||||
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
||||
protected:
|
||||
CFX *m_effect;
|
||||
int m_soundId;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue