Don't try to home in on immortal enemies.

It's annoying when this happens. There's no point in attacking an
immortal enemy.
This commit is contained in:
onpon4 2015-03-07 12:34:07 -05:00
parent 22fcdae8cc
commit 0baa48e7ef
1 changed files with 3 additions and 0 deletions

View File

@ -252,6 +252,9 @@ static object *getRandomEnemy(object *bullet)
if ((aliens[i].shield < 1) || (!aliens[i].active)) if ((aliens[i].shield < 1) || (!aliens[i].active))
return NULL; return NULL;
if (aliens[i].flags & FL_IMMORTAL)
return NULL;
if ((bullet->owner->flags & FL_WEAPCO) && (aliens[i].flags & FL_WEAPCO)) if ((bullet->owner->flags & FL_WEAPCO) && (aliens[i].flags & FL_WEAPCO))
return NULL; return NULL;