This commit is contained in:
Paul 2001-05-25 18:48:58 +00:00
parent fa5105d783
commit 0d2eeed5cb
2 changed files with 26 additions and 0 deletions

View File

@ -75,6 +75,18 @@ static PlayerMetrics s_playerMetrics=
} }; } };
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPlayerModeBalloon::enter()
{
CPlayerModeBase::enter();
m_timer=0;
}
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
Function: Function:
Purpose: Purpose:
@ -84,6 +96,11 @@ static PlayerMetrics s_playerMetrics=
void CPlayerModeBalloon::think() void CPlayerModeBalloon::think()
{ {
CPlayerModeBase::think(); CPlayerModeBase::think();
if(++m_timer>BALLOON_TIMEOUT)
{
CSoundMediator::playSfx(CSoundMediator::SFX_BALLOON_POP);
m_player->setMode(PLAYER_MODE_FULLUNARMED);
}
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------

View File

@ -37,6 +37,7 @@
class CPlayerModeBalloon : public CPlayerModeBase class CPlayerModeBalloon : public CPlayerModeBase
{ {
public: public:
virtual void enter();
virtual void think(); virtual void think();
virtual void render(DVECTOR *_pos); virtual void render(DVECTOR *_pos);
@ -45,6 +46,14 @@ public:
virtual void setAnimNo(int _animNo); virtual void setAnimNo(int _animNo);
private:
enum
{
BALLOON_TIMEOUT=5*60,
};
int m_timer;
}; };