This commit is contained in:
Charles 2001-04-30 19:57:49 +00:00
parent 805eb61563
commit 26e32d4c79
4 changed files with 5 additions and 34 deletions

View File

@ -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;
@ -1417,37 +1410,14 @@ void CNpcEnemy::processEnemyCollision( CThing *thisThing )
s16 headingFromTarget = ratan2( yDist, xDist );
if ( xDist > 0 )
{
Pos.vx += 6;
}
else
{
Pos.vx -= 6;
}
if ( yDist > 0 )
{
Pos.vy += 3;
}
else
{
Pos.vy -= 3;
}
Pos.vx += otherDelta.vx;
Pos.vy += otherDelta.vy;
if ( m_collisionTimer <= 0 )
{
m_collisionTimer = GameState::getOneSecondInFrames();
m_heading = headingFromTarget;
m_heading = headingFromTarget;
// try next waypoint to get around other enemy
// try next waypoint to get around other enemy
m_npcPath.incPath();
}
m_npcPath.incPath();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -280,7 +280,6 @@ protected:
s32 m_velocity;
bool m_evadeClockwise;
s32 m_movementTimer;
s32 m_collisionTimer;
s32 m_timerTimer;
s32 m_extension;
bool m_extendDir;

View File

@ -19,6 +19,7 @@ class CNpcSquidDartEnemy : public CNpcEnemy
public:
void render();
virtual int getFrameCount() {return( 4 );}
virtual u8 canCollideWithEnemy() {return( false );}
};
#endif

View File

@ -23,6 +23,7 @@ class CNpcSmallJellyfishEnemy : public CNpcEnemy
public:
void render();
virtual int getFrameCount() {return( 6 );}
virtual u8 canCollideWithEnemy() {return( false );}
protected:
virtual bool processSensor();
virtual void processClose( int _frames );