From 1757df1340da90a71d0c0b5fab569dd98cce8bad Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 28 May 2016 11:40:56 +0100 Subject: [PATCH] Prevent ALL_OBJECTIVES_COMPLETE from firing more than once. --- src/battle/objectives.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/battle/objectives.c b/src/battle/objectives.c index b4eaee0..87cffaa 100644 --- a/src/battle/objectives.c +++ b/src/battle/objectives.c @@ -150,9 +150,11 @@ void updateObjective(char *name, int type) } } - if (completed == battle.numObjectivesTotal && !hasHidden) + if (completed == battle.numObjectivesTotal && !hasHidden && !fireObjectivesComplete) { runScriptFunction("ALL_OBJECTIVES_COMPLETE"); + + fireObjectivesComplete = 0; } } }