Entities with SIDE_NONE don't count as enemies.

This commit is contained in:
Steve 2016-05-17 11:32:48 +01:00
parent 75c9a25a96
commit 6794a3c268
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ static int nearEnemies(void)
for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) 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)) if ((self->aiFlags & AIF_TARGET_FOCUS) && (e->flags & EF_AI_TARGET))
{ {