From 741efd01ad241f7062e4b583272f0dd66e67c2c4 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 3 Mar 2018 07:41:38 +0000 Subject: [PATCH] Set eliminate all enemies if we need to clear the level. --- src/world/objectives.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/world/objectives.c b/src/world/objectives.c index 70e36ca..49a4238 100644 --- a/src/world/objectives.c +++ b/src/world/objectives.c @@ -41,11 +41,6 @@ void initObjectives(void) { totalTargets = countTargetsInWorld(o->targetName); - if (strcmp(o->targetName, "ENEMY") == 0) - { - world.isEliminateAllEnemies = 1; - } - if (o->totalValue == 0) { o->totalValue = totalTargets; @@ -68,6 +63,11 @@ void initObjectives(void) o->targetValue = o->totalValue; o->required = 0; } + + if (strcmp(o->targetName, "ENEMY") == 0 && o->targetValue == o->totalValue) + { + world.isEliminateAllEnemies = 1; + } } }