Entities with SIDE_NONE don't count as enemies.
This commit is contained in:
parent
75c9a25a96
commit
6794a3c268
|
@ -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))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue