This commit is contained in:
Charles 2001-07-19 16:43:48 +00:00
parent 017b5df9a9
commit 8f6b538674
5 changed files with 15 additions and 50 deletions

View file

@ -22,49 +22,6 @@
#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 );
}
else
{
if( !CSoundMediator::isSfxStillPlaying( (xmPlayingId) m_soundId ) )
{
// unlock sound if it has finished
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
m_soundId = NOT_PLAYING;
}
}
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)