Leader following AI bug fix.
This commit is contained in:
parent
b086fc32e4
commit
a49817ba2e
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue