This commit is contained in:
Paul 2001-05-25 19:30:03 +00:00
parent 69527a4a25
commit 0f49c8b96b
2 changed files with 11 additions and 1 deletions

View File

@ -86,6 +86,7 @@ void CPlayerModeBalloon::enter()
{ {
CPlayerModeBase::enter(); CPlayerModeBase::enter();
m_timer=0; m_timer=0;
m_playedPopSound=false;
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
@ -99,7 +100,10 @@ void CPlayerModeBalloon::think()
CPlayerModeBase::think(); CPlayerModeBase::think();
if(++m_timer>BALLOON_TIMEOUT) 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); m_player->setMode(PLAYER_MODE_FULLUNARMED);
} }
} }
@ -129,6 +133,11 @@ void CPlayerModeBalloon::render(DVECTOR *_pos)
else else
{ {
frame=FRM__BALLOONBURST; 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); CGameScene::getSpriteBank()->printFT4Scaled(frame,pos.vx,pos.vy,0,0,5,balloonsize);
} }

View File

@ -54,6 +54,7 @@ private:
BALLOON_POP_FRAMES=4, BALLOON_POP_FRAMES=4,
}; };
int m_timer; int m_timer;
int m_playedPopSound;
}; };