This commit is contained in:
Charles 2001-07-25 11:39:26 +00:00
parent 1ed1c2bdc0
commit d417b6d0e2
3 changed files with 2 additions and 17 deletions

View file

@ -47,7 +47,6 @@ void CNpcCartPlatform::postInit()
m_playerAttached = false; m_playerAttached = false;
m_falling = false; m_falling = false;
m_rebound = false; m_rebound = false;
m_reboundTimer = 0;
m_inJump = false; m_inJump = false;
} }
@ -64,11 +63,6 @@ void CNpcCartPlatform::processMovement( int _frames )
bool pathComplete; bool pathComplete;
if ( m_reboundTimer > 0 )
{
m_reboundTimer -= _frames;
}
if ( !m_playerAttached && !m_falling ) if ( !m_playerAttached && !m_falling )
{ {
m_playerAttached = true; m_playerAttached = true;
@ -262,10 +256,9 @@ void CNpcCartPlatform::processMovement( int _frames )
{ {
case COLLISION_TYPE_FLAG_DAMAGE: case COLLISION_TYPE_FLAG_DAMAGE:
{ {
if ( m_reboundTimer <= 0 ) if ( m_rebound )
{ {
m_vertSpeed = -8 << 8; m_vertSpeed = -8 << 8;
m_reboundTimer = 2 * GameState::getOneSecondInFrames();
m_rebound = true; m_rebound = true;
Pos.vy -= 8; Pos.vy -= 8;
} }

View file

@ -37,8 +37,6 @@ protected:
u8 m_playerAttached; u8 m_playerAttached;
u8 m_rebound; u8 m_rebound;
u8 m_falling; u8 m_falling;
s32 m_reboundTimer;
}; };
#endif #endif

View file

@ -48,11 +48,6 @@ void CNpcGhostTrainPlatform::processMovement( int _frames )
bool pathComplete; bool pathComplete;
if ( m_reboundTimer > 0 )
{
m_reboundTimer -= _frames;
}
if ( !m_playerAttached && !m_falling ) if ( !m_playerAttached && !m_falling )
{ {
m_playerAttached = true; m_playerAttached = true;
@ -253,10 +248,9 @@ void CNpcGhostTrainPlatform::processMovement( int _frames )
{ {
case COLLISION_TYPE_FLAG_DAMAGE: case COLLISION_TYPE_FLAG_DAMAGE:
{ {
if ( m_reboundTimer <= 0 ) if ( !m_rebound )
{ {
m_vertSpeed = -8 << 8; m_vertSpeed = -8 << 8;
m_reboundTimer = 2 * GameState::getOneSecondInFrames();
m_rebound = true; m_rebound = true;
Pos.vy -= 8; Pos.vy -= 8;
} }