This commit is contained in:
Paul 2001-06-10 17:07:06 +00:00
parent 40cddf5885
commit a1b011dfaa
16 changed files with 214 additions and 314 deletions

View file

@ -623,6 +623,20 @@ void CPlayerModeBase::jump()
moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT;
setMoveVelocity(&moveVel);
}
int spr=2;
void CPlayerModeBase::spring()
{
DVECTOR moveVel;
moveVel=*m_player->getMoveVelocity();
// moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT;
moveVel.vy-=spr;
if(moveVel.vy<-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT)
{
moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<<VELOCITY_SHIFT;
}
setMoveVelocity(&moveVel);
PAUL_DBGMSG("%d",moveVel.vy);
}
void CPlayerModeBase::jumpback()
{
DVECTOR moveVel;

View file

@ -69,8 +69,8 @@ enum
DEFAULT_PLAYER_MAX_SAFE_FALL_FRAMES=30,
DEFAULT_PLAYER_MAX_RUN_VELOCITY=6,
DEFAULT_PLAYER_RUN_SPEEDUP=2<<2,
DEFAULT_PLAYER_RUN_REVERSESLOWDOWN=4<<2,
DEFAULT_PLAYER_RUN_SLOWDOWN=3<<2,
DEFAULT_PLAYER_RUN_REVERSESLOWDOWN=3<<2,
DEFAULT_PLAYER_RUN_SLOWDOWN=2<<2,
DEFAULT_PLAYER_PLAYER_GRAVITY=2<<2,
DEFAULT_PLAYER_TERMINAL_VELOCITY=8,
DEFAULT_BUTT_FALL_VELOCITY=14,
@ -167,6 +167,7 @@ public:
void moveRight();
int slowdown();
void jump();
void spring();
void jumpback();
void fall();
void buttFall();