This commit is contained in:
parent
145b6f88a8
commit
1c5929ca5e
3 changed files with 20 additions and 7 deletions
|
@ -70,7 +70,16 @@ void CNpcHazard::think(int _frames)
|
|||
|
||||
if ( m_isActive )
|
||||
{
|
||||
processMovement( _frames );
|
||||
int moveFrames = _frames;
|
||||
|
||||
if ( moveFrames > 2 )
|
||||
{
|
||||
// make sure hazards don't go berserk if too many frames are dropped
|
||||
|
||||
moveFrames = 2;
|
||||
}
|
||||
|
||||
processMovement( moveFrames );
|
||||
}
|
||||
|
||||
if ( m_timerActive )
|
||||
|
|
|
@ -19,10 +19,5 @@
|
|||
|
||||
void CNpcBubblePlatform::processMovement( int _frames )
|
||||
{
|
||||
if ( _frames > 2 )
|
||||
{
|
||||
_frames = 2;
|
||||
}
|
||||
|
||||
Pos.vy -= m_data[m_type].speed * _frames;
|
||||
}
|
|
@ -418,7 +418,16 @@ void CNpcPlatform::think(int _frames)
|
|||
m_reversed = false;
|
||||
}
|
||||
|
||||
processMovement(_frames);
|
||||
int moveFrames = _frames;
|
||||
|
||||
if ( moveFrames > 2 )
|
||||
{
|
||||
// make sure platforms don't go berserk if too many frames are dropped
|
||||
|
||||
moveFrames = 2;
|
||||
}
|
||||
|
||||
processMovement( moveFrames );
|
||||
|
||||
m_contact = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue