This commit is contained in:
Charles 2001-08-07 14:10:12 +00:00
parent b2a09a2182
commit 5146149e2d

View file

@ -132,37 +132,20 @@ void CNpcFallingHazard::processMovement( int _frames )
if ( groundHeight < yMovement )
{
switch ( CGameScene::getCollision()->getCollisionBlock( Pos.vx, Pos.vy + groundHeight + 8 ) & COLLISION_TYPE_MASK )
if ( m_soundId == NOT_PLAYING )
{
case COLLISION_TYPE_FLAG_SOLID:
{
// drop down
Pos.vy += yMovement;
break;
}
default:
{
if ( m_soundId == NOT_PLAYING )
{
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__ACORN_LAND, true );
}
// colliding with ground
Pos.vy += groundHeight;
m_bounceFinish = true;
m_speed = -5;
m_bounceDir = getRnd() % 2;
m_bouncePos = Pos;
break;
}
m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_HAZARD__ACORN_LAND, true );
}
// colliding with ground
Pos.vy += groundHeight;
m_bounceFinish = true;
m_speed = -5;
m_bounceDir = getRnd() % 2;
m_bouncePos = Pos;
}
else
{