This commit is contained in:
parent
9b31368d0d
commit
62cac8189d
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user