This commit is contained in:
Charles 2001-07-12 20:53:17 +00:00
parent 2ba981f404
commit 349642025b
2 changed files with 29 additions and 0 deletions

View file

@ -20,6 +20,15 @@
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcDropPlatform::postInit()
{
m_dropHit = false;
CNpcPlatform::postInit();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcDropPlatform::processMovement( int _frames )
@ -30,8 +39,24 @@ void CNpcDropPlatform::processMovement( int _frames )
if ( groundHeight < moveY )
{
if ( !m_dropHit )
{
if( m_soundId != NOT_PLAYING )
{
CSoundMediator::stopAndUnlockSfx( (xmPlayingId) m_soundId );
}
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__FALLING_ROCK_LAND, true );
}
m_dropHit = true;
moveY = groundHeight;
}
else
{
m_dropHit = false;
}
Pos.vy += moveY;
}