From b723d42dd49bf08dadd5d03837700018734eb9e6 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 29 May 2016 09:36:37 +0100 Subject: [PATCH] Allow script to immediately terminate mission. --- src/battle/script.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/battle/script.c b/src/battle/script.c index ff1e2e2..f599564 100644 --- a/src/battle/script.c +++ b/src/battle/script.c @@ -247,6 +247,12 @@ static void executeNextLine(ScriptRunner *runner) completeAllObjectives(); completeMission(); } + else if (strcmp(command, "END_MISSION") == 0) + { + battle.unwinnable = 1; + completeMission(); + battle.missionFinishedTimer = -FPS * 999; + } else if (strcmp(command, "FAIL_MISSION") == 0) { addHudMessage(colors.red, _("Mission Failed!"));