From 62cac8189d74c3cdd89e430d1e1c65d73da7df89 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 9 Apr 2001 20:10:22 +0000 Subject: [PATCH] --- source/player/psfall.cpp | 7 ++++++- source/player/psjump.cpp | 3 ++- source/player/psrun.cpp | 4 +--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/source/player/psfall.cpp b/source/player/psfall.cpp index 9835038c9..6a2b7c8f6 100644 --- a/source/player/psfall.cpp +++ b/source/player/psfall.cpp @@ -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(); diff --git a/source/player/psjump.cpp b/source/player/psjump.cpp index 9079c8728..9d3e579b7 100644 --- a/source/player/psjump.cpp +++ b/source/player/psjump.cpp @@ -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); } diff --git a/source/player/psrun.cpp b/source/player/psrun.cpp index 20885bfdd..932aa5898 100644 --- a/source/player/psrun.cpp +++ b/source/player/psrun.cpp @@ -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++;