From 59914477b428af11a4a5deb57cd2f8e9f0ec5440 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 14 Jun 2001 21:22:40 +0000 Subject: [PATCH] --- source/player/player.cpp | 4 ++-- source/player/player.h | 4 ++-- source/player/pmodes.cpp | 2 +- source/player/pmodes.h | 8 ++++++-- source/player/psspring.cpp | 7 +++---- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/source/player/player.cpp b/source/player/player.cpp index 3782c0c9b..39225e9dd 100644 --- a/source/player/player.cpp +++ b/source/player/player.cpp @@ -1548,9 +1548,9 @@ void CPlayer::setAnimNo(int _animNo) Params: Returns: ---------------------------------------------------------------------- */ -void CPlayer::springPlayerUp() +void CPlayer::springPlayerUp(int _springHeight) { - m_currentPlayerModeClass->springPlayerUp(); + m_currentPlayerModeClass->springPlayerUp(_springHeight); } /*---------------------------------------------------------------------- diff --git a/source/player/player.h b/source/player/player.h index 78bb345ff..9a562b7d2 100644 --- a/source/player/player.h +++ b/source/player/player.h @@ -246,8 +246,8 @@ public: int getAnimNo(); void setAnimNo(int _animNo); - void springPlayerUp(); // Springy branches - void floatPlayerUp(); // Geysers + void springPlayerUp(int _springHeight=55); // Springy branches + void floatPlayerUp(); // Geysers void teleportTo(int _x,int _y); private: diff --git a/source/player/pmodes.cpp b/source/player/pmodes.cpp index 09d44348b..430289022 100644 --- a/source/player/pmodes.cpp +++ b/source/player/pmodes.cpp @@ -632,7 +632,7 @@ void CPlayerModeBase::jump() moveVel.vy=-getPlayerMetrics()->m_metric[PM__JUMP_VELOCITY]<setAnimNo(ANIM_SPONGEBOB_JUMP); m_springFrames=0; - - _playerMode->jump(); + _playerMode->spring(); } @@ -82,7 +81,6 @@ void CPlayerStateSpring::enter(CPlayerModeBase *_playerMode) Params: Returns: ---------------------------------------------------------------------- */ -int maxplayerspringframes=50; void CPlayerStateSpring::think(CPlayerModeBase *_playerMode) { const PlayerMetrics *metrics; @@ -94,8 +92,9 @@ void CPlayerStateSpring::think(CPlayerModeBase *_playerMode) _playerMode->advanceAnimFrameAndCheckForEndOfAnim(); - if(m_springFrames<=maxplayerspringframes) + if(m_springFrames<=_playerMode->getSpringHeight()) { + _playerMode->spring(); m_springFrames++; } else