Bug fix for wandering ships.

This commit is contained in:
Steve 2015-12-30 18:44:48 +00:00
parent a8fa0e2087
commit 05db32f04a
1 changed files with 5 additions and 4 deletions

View File

@ -759,7 +759,8 @@ static int lookForLeader(void)
if (self->leader) if (self->leader)
{ {
moveToLeader(); self->aiActionTime = FPS;
self->action = moveToLeader;
return 1; return 1;
} }
@ -773,8 +774,6 @@ static void moveToLeader(void)
if (dist <= 250) if (dist <= 250)
{ {
applyFighterBrakes(); applyFighterBrakes();
self->aiActionTime = MIN(FPS, self->aiActionTime);
} }
else else
{ {
@ -782,6 +781,8 @@ static void moveToLeader(void)
applyFighterThrust(); applyFighterThrust();
} }
nextAction();
} }
static void doWander(void) static void doWander(void)
@ -794,7 +795,7 @@ static void doWander(void)
self->aiActionTime = FPS * 15; self->aiActionTime = FPS * 15;
wander(); self->action = wander;
} }
static void wander(void) static void wander(void)