This commit is contained in:
parent
4c7980c025
commit
a7d277ea59
2 changed files with 138 additions and 0 deletions
74
source/player/pmballoon.cpp
Normal file
74
source/player/pmballoon.cpp
Normal file
|
@ -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 */
|
64
source/player/pmballoon.h
Normal file
64
source/player/pmballoon.h
Normal file
|
@ -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 */
|
||||
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue