Set eliminate all enemies if we need to clear the level.

This commit is contained in:
Steve 2018-03-03 07:41:38 +00:00
parent 0c2f069fef
commit 741efd01ad
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}
}
}