This commit is contained in:
Paul 2001-04-09 20:10:22 +00:00
parent 9b31368d0d
commit 62cac8189d
3 changed files with 9 additions and 5 deletions

View File

@ -66,7 +66,10 @@ CPlayerStateFallFar s_stateFallFar;
---------------------------------------------------------------------- */
void CPlayerStateFall::enter(CPlayerModeBase *_playerMode)
{
_playerMode->setAnimNo(ANIM_SPONGEBOB_JUMP);
if(_playerMode->getAnimNo()!=ANIM_SPONGEBOB_JUMP)
{
_playerMode->setAnimNo(ANIM_SPONGEBOB_JUMP);
}
}
@ -86,6 +89,8 @@ void CPlayerStateFall::think(CPlayerModeBase *_playerMode)
controlHeld=_playerMode->getPadInputHeld();
controlDown=_playerMode->getPadInputDown();
_playerMode->advanceAnimFrameAndCheckForEndOfAnim();
if(controlHeld&PI_LEFT)
{
_playerMode->moveLeft();

View File

@ -94,6 +94,8 @@ void CPlayerStateJump::think(CPlayerModeBase *_playerMode)
controlHeld=_playerMode->getPadInputHeld();
controlDown=_playerMode->getPadInputDown();
_playerMode->advanceAnimFrameAndCheckForEndOfAnim();
if(m_jumpFrames<=metrics->m_metric[PM__MAX_JUMP_FRAMES]&&controlHeld&PI_JUMP)
{
m_jumpFrames++;
@ -120,7 +122,6 @@ void CPlayerStateJump::think(CPlayerModeBase *_playerMode)
{
_playerMode->setState(STATE_BUTTBOUNCE);
}
// advanceAnimFrameAndCheckForEndOfAnim(_player);
}

View File

@ -98,7 +98,6 @@ void CPlayerStateRun::enter(CPlayerModeBase *_playerMode)
Params:
Returns:
---------------------------------------------------------------------- */
int fix=32;
void CPlayerStateRun::think(CPlayerModeBase *_playerMode)
{
int controlDown,controlHeld;
@ -144,8 +143,7 @@ void CPlayerStateRun::think(CPlayerModeBase *_playerMode)
}
}
if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim()||
(_playerMode->getAnimNo()==ANIM_SPONGEBOB_RUN&&_playerMode->getAnimFrame()>=fix))
if(_playerMode->advanceAnimFrameAndCheckForEndOfAnim())
{
_playerMode->setAnimNo(getLoopFrame());
m_numberOfTimesAnimHasLooped++;