Set eliminate all enemies if we need to clear the level.
This commit is contained in:
parent
0c2f069fef
commit
741efd01ad
|
@ -41,11 +41,6 @@ void initObjectives(void)
|
||||||
{
|
{
|
||||||
totalTargets = countTargetsInWorld(o->targetName);
|
totalTargets = countTargetsInWorld(o->targetName);
|
||||||
|
|
||||||
if (strcmp(o->targetName, "ENEMY") == 0)
|
|
||||||
{
|
|
||||||
world.isEliminateAllEnemies = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (o->totalValue == 0)
|
if (o->totalValue == 0)
|
||||||
{
|
{
|
||||||
o->totalValue = totalTargets;
|
o->totalValue = totalTargets;
|
||||||
|
@ -68,6 +63,11 @@ void initObjectives(void)
|
||||||
o->targetValue = o->totalValue;
|
o->targetValue = o->totalValue;
|
||||||
o->required = 0;
|
o->required = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp(o->targetName, "ENEMY") == 0 && o->targetValue == o->totalValue)
|
||||||
|
{
|
||||||
|
world.isEliminateAllEnemies = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue