This commit is contained in:
Charles 2001-06-25 20:44:53 +00:00
parent c76bf22672
commit 32048ee446
2 changed files with 138 additions and 128 deletions

View file

@ -167,6 +167,7 @@ void CNpcSeaSnakeEnemy::postInit()
m_collTimer = 0; m_collTimer = 0;
m_meterOn=false; m_meterOn=false;
m_turnDir = 0; m_turnDir = 0;
m_waitTimer = 0;
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -250,6 +251,12 @@ void CNpcSeaSnakeEnemy::processMovement( int _frames )
} }
} }
if ( m_waitTimer > 0 )
{
m_waitTimer -= _frames;
}
else
{
switch( m_turnDir ) switch( m_turnDir )
{ {
case NPC_SEA_SNAKE_CIRCLE_CLOCKWISE: case NPC_SEA_SNAKE_CIRCLE_CLOCKWISE:
@ -347,6 +354,7 @@ void CNpcSeaSnakeEnemy::processMovement( int _frames )
// if next waypoint is ALSO a start/end waypoint, teleport directly to it // if next waypoint is ALSO a start/end waypoint, teleport directly to it
moveEntireSnake( waypointPos ); moveEntireSnake( waypointPos );
m_waitTimer = 3 * GameState::getOneSecondInFrames();
oldPos.vx = waypointPos.vx; oldPos.vx = waypointPos.vx;
oldPos.vy = waypointPos.vy; oldPos.vy = waypointPos.vy;
@ -405,6 +413,7 @@ void CNpcSeaSnakeEnemy::processMovement( int _frames )
break; break;
} }
} }
}
Pos.vx += moveX; Pos.vx += moveX;
Pos.vy += moveY; Pos.vy += moveY;

View file

@ -97,6 +97,7 @@ protected:
u8 m_turnDir; u8 m_turnDir;
s16 m_circleHeading; s16 m_circleHeading;
s16 m_origHeading; s16 m_origHeading;
s32 m_waitTimer;
}; };
#endif #endif