From 7f3c527f4e333723622b78b877f49bf4d5814171 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sat, 23 Feb 2019 22:41:06 +0100 Subject: [PATCH] Fix a crash in soviet05 --- mods/ra/maps/soviet-05/soviet05.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mods/ra/maps/soviet-05/soviet05.lua b/mods/ra/maps/soviet-05/soviet05.lua index b58927fcb4..ffa6ce1487 100644 --- a/mods/ra/maps/soviet-05/soviet05.lua +++ b/mods/ra/maps/soviet-05/soviet05.lua @@ -144,7 +144,10 @@ end Tick = function() if Greece.HasNoRequiredUnits() and GoodGuy.HasNoRequiredUnits() then player.MarkCompletedObjective(KillAll) - player.MarkCompletedObjective(HoldObjective) + + if HoldObjective then + player.MarkCompletedObjective(HoldObjective) + end end if player.HasNoRequiredUnits() then @@ -226,6 +229,11 @@ WorldLoaded = function() RadarDome.GrantCondition("french") Trigger.OnCapture(RadarDome, function() + if player.IsObjectiveCompleted(KillAll) then + player.MarkCompletedObjective(CaptureObjective) + return + end + HoldObjective = player.AddPrimaryObjective("Defend the Radar Dome.") player.MarkCompletedObjective(CaptureObjective) Beacon.New(player, MCVDeploy.CenterPosition)