This commit is contained in:
parent
017b5df9a9
commit
8f6b538674
@ -431,7 +431,7 @@ void CFX::killFX()
|
||||
}
|
||||
if (EndSnd)
|
||||
{
|
||||
CSoundMediator::playSfx( (CSoundMediator::SFXID)EndSnd,false);
|
||||
CSoundMediator::playSfx( (CSoundMediator::SFXID)EndSnd,false,true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,9 +44,20 @@ void CFXBaseAnim::think(int _frames)
|
||||
MaxFrame=((BaseData->EndFrame-BaseData->StartFrame)<<BaseData->FrameShift)-1;
|
||||
Flags|=BaseData->Flags;
|
||||
renderFrame=BaseData->StartFrame;
|
||||
if(m_soundId==NOT_PLAYING)
|
||||
{
|
||||
if (BaseData->StartSnd)
|
||||
{
|
||||
CSoundMediator::playSfx((CSoundMediator::SFXID)BaseData->StartSnd,false);
|
||||
m_soundId=CSoundMediator::playSfx((CSoundMediator::SFXID)BaseData->StartSnd,true,true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!CSoundMediator::isSfxStillPlaying(m_soundId))
|
||||
{
|
||||
CSoundMediator::stopAndUnlockSfx(m_soundId);
|
||||
m_soundId=NOT_PLAYING;
|
||||
}
|
||||
}
|
||||
EndSnd=BaseData->EndSnd;
|
||||
HasInit=true;
|
||||
|
@ -119,7 +119,7 @@ int TotalLife=0;
|
||||
|
||||
if(m_soundId==NOT_PLAYING)
|
||||
{
|
||||
m_soundId=CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STEAM,true);
|
||||
m_soundId=CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__STEAM,true,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -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)
|
||||
|
@ -43,9 +43,6 @@
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user