diff --git a/source/player/pmballoon.cpp b/source/player/pmballoon.cpp new file mode 100644 index 000000000..1563c9095 --- /dev/null +++ b/source/player/pmballoon.cpp @@ -0,0 +1,74 @@ +/*========================================================================= + + pmballoon.cpp + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#include "player/pmballoon.h" + +#ifndef __PLAYER_PLAYER_H__ +#include "player/player.h" +#endif + + +/* Std Lib + ------- */ + +/* Data + ---- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +/*---------------------------------------------------------------------- + Function Prototypes + ------------------- */ + +/*---------------------------------------------------------------------- + Vars + ---- */ + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +int balloontime=60*20; +void CPlayerModeBalloon::enter(class CPlayer *_player) +{ + m_timer=balloontime; +} + +/*---------------------------------------------------------------------- + Function: + Purpose: + Params: + Returns: + ---------------------------------------------------------------------- */ +void CPlayerModeBalloon::think(class CPlayer *_player) +{ + if(--m_timer==0) + { + _player->setMode(PLAYER_MODE_FULLUNARMED); + } +} + +/*=========================================================================== +end */ diff --git a/source/player/pmballoon.h b/source/player/pmballoon.h new file mode 100644 index 000000000..8828331ff --- /dev/null +++ b/source/player/pmballoon.h @@ -0,0 +1,64 @@ +/*========================================================================= + + pmballoon.h + + Author: PKG + Created: + Project: Spongebob + Purpose: + + Copyright (c) 2001 Climax Development Ltd + +===========================================================================*/ + +#ifndef __PLAYER_PMBALLOON_H__ +#define __PLAYER_PMBALLOON_H__ + +/*---------------------------------------------------------------------- + Includes + -------- */ + +#ifndef __PLAYER_PMODES_H__ +#include "player/pmodes.h" +#endif + + +/* Std Lib + ------- */ + +/*---------------------------------------------------------------------- + Tyepdefs && Defines + ------------------- */ + +/*---------------------------------------------------------------------- + Structure defintions + -------------------- */ + +class CPlayerModeBalloon: public CPlayerMode +{ +public: + virtual void enter(class CPlayer *_player); + virtual void think(class CPlayer *_player); + +private: + int m_timer; +}; + + +/*---------------------------------------------------------------------- + Globals + ------- */ + +/*---------------------------------------------------------------------- + Functions + --------- */ + +/*---------------------------------------------------------------------- */ + +#endif /* __PLAYER_PMBALLOON_H__ */ + +/*=========================================================================== + end */ + + +