From 6794a3c2686254699f8033405598e43ff5b41120 Mon Sep 17 00:00:00 2001 From: Steve Date: Tue, 17 May 2016 11:32:48 +0100 Subject: [PATCH] Entities with SIDE_NONE don't count as enemies. --- 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 1da16aa..1aeb2b1 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -597,7 +597,7 @@ static int nearEnemies(void) for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) { - if ((e->flags & EF_TAKES_DAMAGE) && e->side != self->side && !(e->flags & EF_DISABLED)) + if ((e->flags & EF_TAKES_DAMAGE) && e->side != SIDE_NONE && e->side != self->side && !(e->flags & EF_DISABLED)) { if ((self->aiFlags & AIF_TARGET_FOCUS) && (e->flags & EF_AI_TARGET)) {