From ab2e3a09dbb963256bf434147f0d7302e09736bd Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 29 May 2017 08:39:37 +0100 Subject: [PATCH] Prevent ALL_OBJECTIVES_COMPLETE from firing twice. --- src/battle/objectives.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/battle/objectives.c b/src/battle/objectives.c index 181eca3..1d786ae 100644 --- a/src/battle/objectives.c +++ b/src/battle/objectives.c @@ -84,9 +84,9 @@ void doObjectives(void) { if (fireObjectivesComplete) { - runScriptFunction("ALL_OBJECTIVES_COMPLETE"); - fireObjectivesComplete = 0; + + runScriptFunction("ALL_OBJECTIVES_COMPLETE"); } if (!battle.manualComplete) @@ -154,11 +154,11 @@ void updateObjective(char *name, int type) } } - if (completed == battle.numObjectivesTotal && !hasHidden && !fireObjectivesComplete) + if (completed == battle.numObjectivesTotal && !hasHidden && fireObjectivesComplete) { - runScriptFunction("ALL_OBJECTIVES_COMPLETE"); - fireObjectivesComplete = 0; + + runScriptFunction("ALL_OBJECTIVES_COMPLETE"); } } }