When killing an entity, strip the name to prevent objectives firing.

This commit is contained in:
Steve 2016-05-05 14:06:19 +01:00
parent 1acd6f7cf4
commit 9c18974a63
1 changed files with 4 additions and 1 deletions

View File

@ -604,7 +604,6 @@ void countNumEnemies(void)
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
{
if (e->side != SIDE_ALLIES && e->type == ET_FIGHTER && (!(e->flags & EF_NO_THREAT)))
if (e->side != SIDE_ALLIES && (e->type == ET_FIGHTER || e->type == ET_CAPITAL_SHIP) && (!(e->flags & EF_NO_THREAT)))
{
battle.numInitialEnemies++;
@ -645,6 +644,10 @@ void killEntity(char *name)
{
e->health = 0;
e->deathType = DT_INSTANT;
/* prevent objectives and conditions from firing */
strcpy(e->name, "");
strcpy(e->groupName, "");
}
}
}