From dcffbc3f11adef24ebd2bf90de932570c0021deb Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Mon, 25 May 2015 01:01:27 +0200 Subject: [PATCH] Fixed captured buildings producing bot controled units --- mods/cnc/maps/gdi05b/gdi05b.lua | 2 +- mods/cnc/maps/nod02a/nod02a.lua | 12 ++++++------ mods/cnc/maps/nod02b/nod02b.lua | 12 ++++++------ mods/cnc/maps/nod05/nod05.lua | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/mods/cnc/maps/gdi05b/gdi05b.lua b/mods/cnc/maps/gdi05b/gdi05b.lua index 8ec36d355e..693554e784 100644 --- a/mods/cnc/maps/gdi05b/gdi05b.lua +++ b/mods/cnc/maps/gdi05b/gdi05b.lua @@ -101,7 +101,7 @@ Atk5TriggerFunction = function() end StartProduction = function(type) - if Hand1.IsInWorld then + if Hand1.IsInWorld and Hand1.Owner == nod then Hand1.Build(type) Trigger.AfterDelay(DateTime.Seconds(30), function() StartProduction(type) end) end diff --git a/mods/cnc/maps/nod02a/nod02a.lua b/mods/cnc/maps/nod02a/nod02a.lua index eff80110e6..ffc5e5a03a 100644 --- a/mods/cnc/maps/nod02a/nod02a.lua +++ b/mods/cnc/maps/nod02a/nod02a.lua @@ -234,7 +234,7 @@ Tick = function() Nod.MarkCompletedObjective(NodObjective1) end - if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld then + if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld and Barracks.Owner == gdi then checkProduction(GDI) end end @@ -267,8 +267,8 @@ getStartUnits = function() end) end -IdleHunt = function(unit) - if not unit.IsDead then - Trigger.OnIdle(unit, unit.Hunt) - end -end \ No newline at end of file +IdleHunt = function(unit) + if not unit.IsDead then + Trigger.OnIdle(unit, unit.Hunt) + end +end diff --git a/mods/cnc/maps/nod02b/nod02b.lua b/mods/cnc/maps/nod02b/nod02b.lua index a1083b0846..8b69f52938 100644 --- a/mods/cnc/maps/nod02b/nod02b.lua +++ b/mods/cnc/maps/nod02b/nod02b.lua @@ -152,7 +152,7 @@ Tick = function() Nod.MarkCompletedObjective(NodObjective1) end - if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld then + if DateTime.GameTime % DateTime.Seconds(3) == 0 and Barracks.IsInWorld and Barracks.Owner == gdi then checkProduction(GDI) end end @@ -234,8 +234,8 @@ InsertNodUnits = function() Reinforcements.Reinforce(Nod, { "mcv" }, { McvEntry.Location, McvRally.Location }) end -IdleHunt = function(unit) - if not unit.IsDead then - Trigger.OnIdle(unit, unit.Hunt) - end -end \ No newline at end of file +IdleHunt = function(unit) + if not unit.IsDead then + Trigger.OnIdle(unit, unit.Hunt) + end +end diff --git a/mods/cnc/maps/nod05/nod05.lua b/mods/cnc/maps/nod05/nod05.lua index 1a357bc22e..b40e42ea3b 100644 --- a/mods/cnc/maps/nod05/nod05.lua +++ b/mods/cnc/maps/nod05/nod05.lua @@ -295,9 +295,9 @@ checkProduction = function(player) end end if #UnitsType > 0 then - if (type == 'jeep' or type == 'mtnk') and not Factory.IsDead then + if (type == 'jeep' or type == 'mtnk') and not Factory.IsDead and Factory.Owner == gdi then Factory.Build(UnitsType) - elseif (type == 'e1' or type == 'e2') and not Barracks.IsDead then + elseif (type == 'e1' or type == 'e2') and not Barracks.IsDead and Barracks.Owner == gdi then Barracks.Build(UnitsType) end end