This commit is contained in:
parent
2ba981f404
commit
349642025b
2 changed files with 29 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue