From 9c18974a639325ecc5ba1c3d5ff99c5e297c8078 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 5 May 2016 14:06:19 +0100 Subject: [PATCH] When killing an entity, strip the name to prevent objectives firing. --- src/battle/entities.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/battle/entities.c b/src/battle/entities.c index 72f6540..fa03038 100644 --- a/src/battle/entities.c +++ b/src/battle/entities.c @@ -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, ""); } } }