This commit is contained in:
parent
d5b8612088
commit
306abfd594
2 changed files with 6 additions and 11 deletions
|
@ -592,7 +592,6 @@ void CNpcEnemy::init()
|
|||
m_heading = m_fireHeading = 0;
|
||||
m_movementTimer = 0;
|
||||
m_timerTimer = 0;
|
||||
m_collisionTimer = 0;
|
||||
m_velocity = 0;
|
||||
m_extension = 0;
|
||||
m_rotation = 0;
|
||||
|
@ -643,7 +642,6 @@ void CNpcEnemy::reinit()
|
|||
m_heading = m_fireHeading = 0;
|
||||
m_movementTimer = 0;
|
||||
m_timerTimer = 0;
|
||||
m_collisionTimer = 0;
|
||||
m_velocity = 0;
|
||||
m_extension = 0;
|
||||
m_rotation = 0;
|
||||
|
@ -1239,11 +1237,6 @@ void CNpcEnemy::processCollision()
|
|||
|
||||
void CNpcEnemy::processTimer(int _frames)
|
||||
{
|
||||
if ( m_collisionTimer > 0 )
|
||||
{
|
||||
m_collisionTimer -= _frames;
|
||||
}
|
||||
|
||||
if ( m_timerTimer > 0 )
|
||||
{
|
||||
m_timerTimer -= _frames;
|
||||
|
@ -1432,10 +1425,13 @@ void CNpcEnemy::processEnemyCollision( CThing *thisThing )
|
|||
|
||||
m_heading = headingFromTarget;
|
||||
|
||||
if ( m_collisionTimer <= 0 )
|
||||
{
|
||||
m_collisionTimer = GameState::getOneSecondInFrames();
|
||||
s32 waypointXDist;
|
||||
s32 waypointYDist;
|
||||
|
||||
m_npcPath.getDistToNextWaypoint( Pos, &waypointXDist, &waypointYDist );
|
||||
|
||||
if ( ( xDist > 0 && waypointXDist < 0 ) || ( xDist < 0 && waypointXDist > 0 ) )
|
||||
{
|
||||
// try next waypoint to get around other enemy
|
||||
|
||||
m_npcPath.incPath();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue