Ignore disabled fighters when looking for a target.

This commit is contained in:
Steve 2015-11-29 12:56:38 +00:00
parent 146bd1ef45
commit 2e5207f9c3
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ static void findTarget(void)
for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i])
{
if (e->active && e->type == ET_FIGHTER && e->side != self->side && e->health > 0 && canAttack(e))
if (e->active && e->type == ET_FIGHTER && (!(e->flags & EF_DISABLED)) && e->side != self->side && e->health > 0 && canAttack(e))
{
dist = getDistance(self->x, self->y, e->x, e->y);