From 5146149e2d7e1adb3ee10e5af0f2846ed0b4e2eb Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 7 Aug 2001 14:10:12 +0000 Subject: [PATCH] --- source/hazard/hfalling.cpp | 41 +++++++++++--------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/source/hazard/hfalling.cpp b/source/hazard/hfalling.cpp index a57ef5b47..b0e78251d 100644 --- a/source/hazard/hfalling.cpp +++ b/source/hazard/hfalling.cpp @@ -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 {