From 7c7e5efc4f0e3f949b00c6b1fb520d09609dd022 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Wed, 25 Mar 2015 16:15:49 +0100 Subject: [PATCH] Fix a fatal error in allies05a --- mods/ra/maps/allies-05a/AI.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mods/ra/maps/allies-05a/AI.lua b/mods/ra/maps/allies-05a/AI.lua index 94e8756bf4..530528c8ce 100644 --- a/mods/ra/maps/allies-05a/AI.lua +++ b/mods/ra/maps/allies-05a/AI.lua @@ -89,15 +89,19 @@ end InitAIEconomy = function() ussr.Cash = 6000 - Harvester.FindResources() - ProtectHarvester(Harvester) + if not Harvester.IsDead then + Harvester.FindResources() + ProtectHarvester(Harvester) + end end InitProductionBuildings = function() if not Warfactory2.IsDead then Warfactory2.IsPrimaryBuilding = true + Trigger.OnKilled(Warfactory2, function() BuildVehicles = false end) + else + BuildVehicles = false end - Trigger.OnKilled(Warfactory2, function() BuildVehicles = false end) if not Barracks2.IsDead then Barracks2.IsPrimaryBuilding = true @@ -115,6 +119,10 @@ InitProductionBuildings = function() Trigger.OnKilled(Barracks3, function() if Barracks2.IsDead then TrainInfantry = false end end) end + if Barracks2.IsDead and Barracks3.IsDead then + TrainInfantry = false + end + if Map.Difficulty == "Normal" then if not Airfield1.IsDead then