From c0595dc15b5993bee87dda25db50caff6fe0b279 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 12 Jul 2001 16:53:21 +0000 Subject: [PATCH] --- source/hazard/hbrock.cpp | 5 +++++ source/hazard/hflytrap.cpp | 5 +++++ source/hazard/hrrock.cpp | 7 ++----- source/platform/pcart.cpp | 1 + 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/hazard/hbrock.cpp b/source/hazard/hbrock.cpp index 29c55760b..a17aab691 100644 --- a/source/hazard/hbrock.cpp +++ b/source/hazard/hbrock.cpp @@ -115,6 +115,11 @@ void CNpcBouncingRockHazard::processMovement( int _frames ) // deal with horizontal + if ( m_soundId == NOT_PLAYING ) + { + m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_ROLLING_ROCK, true ); + } + bool pathComplete; if ( m_npcPath.thinkFlat( Pos, &pathComplete, &waypointXDist, &waypointYDist, &waypointHeading, 1 ) ) diff --git a/source/hazard/hflytrap.cpp b/source/hazard/hflytrap.cpp index 2710f78af..c98f0aad9 100644 --- a/source/hazard/hflytrap.cpp +++ b/source/hazard/hflytrap.cpp @@ -61,6 +61,11 @@ void CNpcFlyTrapHazard::processMovement( int _frames ) m_shut = false; m_contact = false; m_timer = GameState::getOneSecondInFrames(); + + if ( m_soundId == NOT_PLAYING ) + { + m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_CLAM_ATTACK, true ); + } } } else diff --git a/source/hazard/hrrock.cpp b/source/hazard/hrrock.cpp index 5e6cf4670..a7de3faad 100644 --- a/source/hazard/hrrock.cpp +++ b/source/hazard/hrrock.cpp @@ -64,12 +64,9 @@ void CNpcRollingRockHazard::processMovement( int _frames ) } else { - if ( !m_jump ) + if ( m_soundId == NOT_PLAYING ) { - if ( m_soundId == NOT_PLAYING ) - { - m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_ROLLING_ROCK, true ); - } + m_soundId = (int) CSoundMediator::playSfx( CSoundMediator::SFX_ROLLING_ROCK, true ); } if ( distX ) diff --git a/source/platform/pcart.cpp b/source/platform/pcart.cpp index e2f9eff64..09535689e 100644 --- a/source/platform/pcart.cpp +++ b/source/platform/pcart.cpp @@ -344,6 +344,7 @@ void CNpcCartPlatform::jump() { m_inJump = true; m_vertSpeed = -8 << 8; + CSoundMediator::playSfx(CSoundMediator::SFX_SPONGEBOB_JUMP); } }