diff --git a/source/platform/pcart.cpp b/source/platform/pcart.cpp index 61d39bb76..e948fc2d2 100644 --- a/source/platform/pcart.cpp +++ b/source/platform/pcart.cpp @@ -47,7 +47,6 @@ void CNpcCartPlatform::postInit() m_playerAttached = false; m_falling = false; m_rebound = false; - m_reboundTimer = 0; m_inJump = false; } @@ -64,11 +63,6 @@ void CNpcCartPlatform::processMovement( int _frames ) bool pathComplete; - if ( m_reboundTimer > 0 ) - { - m_reboundTimer -= _frames; - } - if ( !m_playerAttached && !m_falling ) { m_playerAttached = true; @@ -262,10 +256,9 @@ void CNpcCartPlatform::processMovement( int _frames ) { case COLLISION_TYPE_FLAG_DAMAGE: { - if ( m_reboundTimer <= 0 ) + if ( m_rebound ) { m_vertSpeed = -8 << 8; - m_reboundTimer = 2 * GameState::getOneSecondInFrames(); m_rebound = true; Pos.vy -= 8; } diff --git a/source/platform/pcart.h b/source/platform/pcart.h index c3d883a00..40d66ec8d 100644 --- a/source/platform/pcart.h +++ b/source/platform/pcart.h @@ -37,8 +37,6 @@ protected: u8 m_playerAttached; u8 m_rebound; u8 m_falling; - - s32 m_reboundTimer; }; #endif \ No newline at end of file diff --git a/source/platform/pghost.cpp b/source/platform/pghost.cpp index 53cdb32ce..2ba46c68a 100644 --- a/source/platform/pghost.cpp +++ b/source/platform/pghost.cpp @@ -48,11 +48,6 @@ void CNpcGhostTrainPlatform::processMovement( int _frames ) bool pathComplete; - if ( m_reboundTimer > 0 ) - { - m_reboundTimer -= _frames; - } - if ( !m_playerAttached && !m_falling ) { m_playerAttached = true; @@ -253,10 +248,9 @@ void CNpcGhostTrainPlatform::processMovement( int _frames ) { case COLLISION_TYPE_FLAG_DAMAGE: { - if ( m_reboundTimer <= 0 ) + if ( !m_rebound ) { m_vertSpeed = -8 << 8; - m_reboundTimer = 2 * GameState::getOneSecondInFrames(); m_rebound = true; Pos.vy -= 8; }