From d8783cc557677c71db167410f20ed3199f2499f3 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 26 Nov 2015 21:53:54 +0000 Subject: [PATCH] When avoiding enemies, ignore disabled ones. --- src/battle/ai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle/ai.c b/src/battle/ai.c index 0b9800c..5080f6e 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -455,7 +455,7 @@ static int nearEnemies(void) for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) { - if (e->type == ET_FIGHTER && e->side != self->side) + if (e->type == ET_FIGHTER && e->side != self->side && !(e->flags & EF_DISABLED)) { self->targetLocation.x += e->x; self->targetLocation.y += e->y;