Leader following AI bug fix.

This commit is contained in:
Steve 2016-04-15 11:31:11 +01:00
parent b086fc32e4
commit a49817ba2e
1 changed files with 1 additions and 3 deletions

View File

@ -885,6 +885,7 @@ static int lookForLeader(void)
{ {
self->aiActionTime = FPS; self->aiActionTime = FPS;
self->action = moveToLeader; self->action = moveToLeader;
self->aiActionTime = FPS + (rand() % FPS);
return 1; return 1;
} }
@ -909,9 +910,6 @@ static void moveToLeader(void)
self->speed = sqrt(self->leader->thrust); self->speed = sqrt(self->leader->thrust);
applyFighterThrust(); applyFighterThrust();
self->speed = oldSpeed; self->speed = oldSpeed;
/* don't all react at once */
self->aiActionTime = FPS + (rand() % FPS);
} }
else else
{ {