diff --git a/source/player/pmbloon.cpp b/source/player/pmbloon.cpp index 48542e5f3..96ab246d3 100644 --- a/source/player/pmbloon.cpp +++ b/source/player/pmbloon.cpp @@ -86,6 +86,7 @@ void CPlayerModeBalloon::enter() { CPlayerModeBase::enter(); m_timer=0; + m_playedPopSound=false; } /*---------------------------------------------------------------------- @@ -99,7 +100,10 @@ void CPlayerModeBalloon::think() CPlayerModeBase::think(); if(++m_timer>BALLOON_TIMEOUT) { - CSoundMediator::playSfx(CSoundMediator::SFX_BALLOON_POP); + if(!m_playedPopSound) + { + CSoundMediator::playSfx(CSoundMediator::SFX_BALLOON_POP); + } m_player->setMode(PLAYER_MODE_FULLUNARMED); } } @@ -129,6 +133,11 @@ void CPlayerModeBalloon::render(DVECTOR *_pos) else { frame=FRM__BALLOONBURST; + if(!m_playedPopSound) + { + CSoundMediator::playSfx(CSoundMediator::SFX_BALLOON_POP); + m_playedPopSound=true; + } } CGameScene::getSpriteBank()->printFT4Scaled(frame,pos.vx,pos.vy,0,0,5,balloonsize); } diff --git a/source/player/pmbloon.h b/source/player/pmbloon.h index c39a6cc19..85b89d24f 100644 --- a/source/player/pmbloon.h +++ b/source/player/pmbloon.h @@ -54,6 +54,7 @@ private: BALLOON_POP_FRAMES=4, }; int m_timer; + int m_playedPopSound; };