98 lines
2.4 KiB
C++
98 lines
2.4 KiB
C++
/*=========================================================================
|
|
|
|
pmbloon.cpp
|
|
|
|
Author: PKG
|
|
Created:
|
|
Project: Spongebob
|
|
Purpose:
|
|
|
|
Copyright (c) 2001 Climax Development Ltd
|
|
|
|
===========================================================================*/
|
|
|
|
/*----------------------------------------------------------------------
|
|
Includes
|
|
-------- */
|
|
|
|
#include "player\pmbloon.h"
|
|
|
|
|
|
/* Std Lib
|
|
------- */
|
|
|
|
/* Data
|
|
---- */
|
|
|
|
/*----------------------------------------------------------------------
|
|
Tyepdefs && Defines
|
|
------------------- */
|
|
|
|
/*----------------------------------------------------------------------
|
|
Structure defintions
|
|
-------------------- */
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function Prototypes
|
|
------------------- */
|
|
|
|
/*----------------------------------------------------------------------
|
|
Vars
|
|
---- */
|
|
|
|
static PlayerMetrics s_playerMetrics=
|
|
{ {
|
|
DEFAULT_PLAYER_JUMP_VELOCITY, // PM__JUMP_VELOCITY
|
|
DEFAULT_PLAYER_MAX_JUMP_FRAMES, // PM__MAX_JUMP_FRAMES
|
|
DEFAULT_PLAYER_MAX_SAFE_FALL_FRAMES, // PM__MAX_SAFE_FALL_FRAMES
|
|
DEFAULT_PLAYER_MAX_RUN_VELOCITY, // PM__MAX_RUN_VELOCITY
|
|
DEFAULT_PLAYER_RUN_SPEEDUP, // PM__RUN_SPEEDUP
|
|
DEFAULT_PLAYER_RUN_REVERSESLOWDOWN, // PM__RUN_REVERSESLOWDOWN
|
|
DEFAULT_PLAYER_RUN_SLOWDOWN, // PM__RUN_SLOWDOWN
|
|
DEFAULT_PLAYER_PLAYER_GRAVITY/3, // PM__GRAVITY
|
|
DEFAULT_PLAYER_TERMINAL_VELOCITY/3, // PM__TERMINAL_VELOCITY
|
|
} };
|
|
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function:
|
|
Purpose:
|
|
Params:
|
|
Returns:
|
|
---------------------------------------------------------------------- */
|
|
void CPlayerModeBalloon::enter()
|
|
{
|
|
CPlayerModeBase::enter();
|
|
m_ballonTimer=BALLOON_TIME;
|
|
}
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function:
|
|
Purpose:
|
|
Params:
|
|
Returns:
|
|
---------------------------------------------------------------------- */
|
|
void CPlayerModeBalloon::think()
|
|
{
|
|
CPlayerModeBase::think();
|
|
if(--m_ballonTimer==0)
|
|
{
|
|
m_player->setMode(PLAYER_MODE_FULLUNARMED);
|
|
PAUL_DBGMSG("*pop*");
|
|
}
|
|
}
|
|
|
|
/*----------------------------------------------------------------------
|
|
Function:
|
|
Purpose:
|
|
Params:
|
|
Returns:
|
|
---------------------------------------------------------------------- */
|
|
const struct PlayerMetrics *CPlayerModeBalloon::getPlayerMetrics()
|
|
{
|
|
return &s_playerMetrics;
|
|
}
|
|
|
|
/*===========================================================================
|
|
end */
|