This commit is contained in:
Charles 2001-02-07 16:42:13 +00:00
parent 179b2a6231
commit e77ef80771
12 changed files with 126 additions and 141 deletions

View file

@ -108,20 +108,7 @@ void CNpc::processCloseSmallJellyfishEvade( int _frames )
s32 moveVel = 0;
CPlayer *player = GameScene.getPlayer();
DVECTOR playerPos = player->getPos();
s32 xDist, yDist;
s32 xDistSqr, yDistSqr;
xDist = playerPos.vx - this->Pos.vx;
xDistSqr = xDist * xDist;
yDist = playerPos.vy - this->Pos.vy;
yDistSqr = yDist * yDist;
if ( xDistSqr + yDistSqr > 22500 )
if ( playerXDistSqr + playerYDistSqr > 22500 )
{
this->m_controlFunc = NPC_CONTROL_MOVEMENT;
}
@ -138,7 +125,7 @@ void CNpc::processCloseSmallJellyfishEvade( int _frames )
}
else
{
s16 headingToPlayer = ratan2( yDist, xDist );
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
if ( m_evadeClockwise )
{