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

@ -32,17 +32,10 @@ void CNpc::processCloseAnemone1Attack( int _frames )
{
s32 moveX, moveY;
s16 decDir, incDir, moveDist;
CPlayer *player = GameScene.getPlayer();
DVECTOR playerPos = player->getPos();
s32 xDist, yDist;
s16 maxTurnRate = m_data[m_type].turnSpeed;
bool withinRange = false;
xDist = playerPos.vx - this->Pos.vx;
yDist = playerPos.vy - this->Pos.vy;
s16 headingToPlayer = ratan2( yDist, xDist );
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
decDir = m_fireHeading - headingToPlayer;