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 {