Don't circle your destination if you're near it.

This commit is contained in:
Steve 2016-05-17 11:34:08 +01:00
parent 6794a3c268
commit d3091caed5
1 changed files with 1 additions and 1 deletions

View File

@ -957,7 +957,7 @@ static void wander(void)
{ {
moveToTargetLocation(); moveToTargetLocation();
if (nearEnemies()) if (nearEnemies() || getDistance(self->x, self->y, self->targetLocation.x, self->targetLocation.y) <= 100)
{ {
self->aiActionTime = 0; self->aiActionTime = 0;
} }