This commit is contained in:
parent
08d3b3132f
commit
bb895ddd22
5 changed files with 51 additions and 45 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue