From 8a4fea8d7a5eda8645e11d09f4ee3b8940899763 Mon Sep 17 00:00:00 2001 From: Charles Date: Tue, 14 Aug 2001 18:46:33 +0000 Subject: [PATCH] --- source/platform/pcart.cpp | 2 +- source/platform/pcart.h | 1 + source/platform/pghost.cpp | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) 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 {