diff --git a/source/platform/pcart.cpp b/source/platform/pcart.cpp index 23bd9e967..6d6333d02 100644 --- a/source/platform/pcart.cpp +++ b/source/platform/pcart.cpp @@ -350,7 +350,7 @@ void CNpcCartPlatform::render() void CNpcCartPlatform::jump() { - if ( !m_inJump && !m_rebound ) + if ( !m_inJump && !m_rebound && m_trackContact ) { m_inJump = true; m_vertSpeed = -8 << 8; diff --git a/source/platform/pcart.h b/source/platform/pcart.h index 40d66ec8d..a7a838030 100644 --- a/source/platform/pcart.h +++ b/source/platform/pcart.h @@ -37,6 +37,7 @@ protected: u8 m_playerAttached; u8 m_rebound; u8 m_falling; + u8 m_trackContact; }; #endif \ No newline at end of file diff --git a/source/platform/pghost.cpp b/source/platform/pghost.cpp index fadf24183..474fecdfc 100644 --- a/source/platform/pghost.cpp +++ b/source/platform/pghost.cpp @@ -33,6 +33,7 @@ void CNpcGhostTrainPlatform::postInit() m_speedSetting = GO_DEFAULT; m_carSpeed >>= 8; + m_trackContact = false; } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -62,6 +63,8 @@ void CNpcGhostTrainPlatform::processMovement( int _frames ) m_contact = true; } + m_trackContact = false; + if ( m_isActivated ) { if ( m_falling ) @@ -110,6 +113,7 @@ void CNpcGhostTrainPlatform::processMovement( int _frames ) // have touched down m_rebound = false; + m_trackContact = true; moveY += groundHeight; } @@ -178,6 +182,7 @@ void CNpcGhostTrainPlatform::processMovement( int _frames ) // have touched down m_inJump = false; + m_trackContact = true; moveY += groundHeight; } } @@ -194,6 +199,7 @@ void CNpcGhostTrainPlatform::processMovement( int _frames ) // groundHeight <= yMovement indicates either just above ground or on or below ground moveY = groundHeight; + m_trackContact = true; } else {