Don't circle your destination if you're near it.
This commit is contained in:
parent
6794a3c268
commit
d3091caed5
|
@ -957,7 +957,7 @@ static void wander(void)
|
|||
{
|
||||
moveToTargetLocation();
|
||||
|
||||
if (nearEnemies())
|
||||
if (nearEnemies() || getDistance(self->x, self->y, self->targetLocation.x, self->targetLocation.y) <= 100)
|
||||
{
|
||||
self->aiActionTime = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue