This commit is contained in:
Charles 2001-04-01 21:40:52 +00:00
parent f67b64565d
commit 12567cce7a
4 changed files with 49 additions and 17 deletions

View file

@ -300,8 +300,6 @@ char posBuf[100];
void CPlayer::think(int _frames)
{
int i;
CPlayerThing::think(_frames);
if(PadGetHeld(0)&PAD_L1&&PadGetHeld(0)&PAD_L2)
@ -413,6 +411,8 @@ else if(Pos.vy>m_mapEdge.vy-64)Pos.vy=m_mapEdge.vy-64;
m_cameraPos.vy=m_mapCameraEdges.vy;
m_cameraScrollDir=0;
}
CPlayerThing::think(_frames);
}

View file

@ -323,6 +323,31 @@ void CPlayerModeBase::thinkVerticalMovement()
{
pos.vy += colHeight;
m_moveVelocity.vy=0;
m_fallFrames=0;
if(m_currentState==STATE_BUTTFALL)
{
// Landed from a butt bounce
setState(STATE_BUTTLAND);
}
else if(m_currentState==STATE_FALLFAR)
{
// Landed from a painfully long fall
setState(STATE_IDLE);
m_player->takeDamage(DAMAGE__FALL);
m_moveVelocity.vx=0;
CSoundMediator::playSfx(CSoundMediator::SFX_SPONGEBOB_LAND_AFTER_FALL);
}
else if(m_moveVelocity.vx)
{
// Landed from a jump with x movement
setState(STATE_RUN);
}
else
{
// Landed from a jump with no x movement
setState(STATE_IDLE);
setAnimNo(ANIM_SPONGEBOB_JUMPEND);
}
}
}