This commit is contained in:
Paul 2001-07-09 15:32:51 +00:00
parent 08d3b3132f
commit bb895ddd22
5 changed files with 51 additions and 45 deletions

View file

@ -31,7 +31,6 @@ void CFXSteam::init(DVECTOR const &_Pos)
DieOut=false;
SetSize(DefSize);
IsHorizontal=false;
m_soundId=CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STEAM,true);
}
/*****************************************************************************/
@ -112,12 +111,21 @@ int TotalLife=0;
TotalLife+=ThisElem.Shade;
}
if(m_soundId==NOT_PLAYING)
{
m_soundId=CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STEAM,true);
}
else
{
if(!CSoundMediator::isSfxStillPlaying(m_soundId))
{
CSoundMediator::stopAndUnlockSfx(m_soundId);
m_soundId=NOT_PLAYING;
}
}
if (DieOut && TotalLife==0)
{
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx(m_soundId );
}
setToShutdown();
}
}