From 05db32f04ac2e6023c9a29f09bc5f20a2edcf023 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 30 Dec 2015 18:44:48 +0000 Subject: [PATCH] Bug fix for wandering ships. --- src/battle/ai.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/battle/ai.c b/src/battle/ai.c index 3cc4990..494cc5e 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -759,7 +759,8 @@ static int lookForLeader(void) if (self->leader) { - moveToLeader(); + self->aiActionTime = FPS; + self->action = moveToLeader; return 1; } @@ -773,8 +774,6 @@ static void moveToLeader(void) if (dist <= 250) { applyFighterBrakes(); - - self->aiActionTime = MIN(FPS, self->aiActionTime); } else { @@ -782,6 +781,8 @@ static void moveToLeader(void) applyFighterThrust(); } + + nextAction(); } static void doWander(void) @@ -794,7 +795,7 @@ static void doWander(void) self->aiActionTime = FPS * 15; - wander(); + self->action = wander; } static void wander(void)