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

@ -306,6 +306,21 @@ CFX *NewFX=CFX::Create(Type);
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
void CFX::leftThinkZone(int _frames)
{
if(Flags & FX_FLAG_NO_THINK_KILL)
{
killFX();
}
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx(m_soundId);
m_soundId=NOT_PLAYING;
}
}
/*****************************************************************************/
void CFX::init()
{
@ -404,14 +419,15 @@ void CFX::killFX()
{
CFX::Create((CFX::FX_TYPE)AfterEffect,getPos());
}
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx(m_soundId);
m_soundId=NOT_PLAYING;
}
if (EndSnd)
{
CSoundMediator::playSfx( (CSoundMediator::SFXID)EndSnd,false);
}
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx(m_soundId );
}
}