diff --git a/src/battle/objectives.c b/src/battle/objectives.c index 636e9b5..759b91d 100644 --- a/src/battle/objectives.c +++ b/src/battle/objectives.c @@ -178,6 +178,16 @@ void updateCondition(char *name, int type) } } +void completeAllObjectives(void) +{ + Objective *o; + + for (o = battle.objectiveHead.next ; o != NULL ; o = o->next) + { + o->status = OS_COMPLETE; + } +} + void completeConditions(void) { Objective *o; diff --git a/src/battle/script.c b/src/battle/script.c index 2e2654a..bc0e02a 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -245,6 +245,7 @@ static void executeNextLine(ScriptRunner *runner) else if (strcmp(command, "COMPLETE_MISSION") == 0) { addHudMessage(colors.green, _("Mission Complete!")); + completeAllObjectives(); completeMission(); } else if (strcmp(command, "FAIL_MISSION") == 0) diff --git a/src/battle/script.h b/src/battle/script.h index e0e9b5e..8b07f1d 100644 --- a/src/battle/script.h +++ b/src/battle/script.h @@ -37,6 +37,7 @@ extern char *getTranslatedString(char *string); extern void activateNextWaypoint(void); extern void activateJumpgate(int activate); extern void activateSpawner(char *name, int active); +extern void completeAllObjectives(void); extern Battle battle; extern Colors colors;