Merge pull request #8243 from abcdefg30/capturecontrol

Fixed captured buildings producing bot controled units
This commit is contained in:
Oliver Brakmann
2015-05-27 14:55:55 +02:00
5 changed files with 18 additions and 15 deletions

View File

@@ -101,7 +101,7 @@ Atk5TriggerFunction = function()
end end
StartProduction = function(type) StartProduction = function(type)
if Hand1.IsInWorld then if Hand1.IsInWorld and Hand1.Owner == nod then
Hand1.Build(type) Hand1.Build(type)
Trigger.AfterDelay(DateTime.Seconds(30), function() StartProduction(type) end) Trigger.AfterDelay(DateTime.Seconds(30), function() StartProduction(type) end)
end end

View File

@@ -234,7 +234,7 @@ Tick = function()
Nod.MarkCompletedObjective(NodObjective1) Nod.MarkCompletedObjective(NodObjective1)
end 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) checkProduction(GDI)
end end
end end

View File

@@ -152,7 +152,7 @@ Tick = function()
Nod.MarkCompletedObjective(NodObjective1) Nod.MarkCompletedObjective(NodObjective1)
end 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) checkProduction(GDI)
end end
end end

View File

@@ -295,9 +295,9 @@ checkProduction = function(player)
end end
end end
if #UnitsType > 0 then 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) 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) Barracks.Build(UnitsType)
end end
end end

View File

@@ -2342,6 +2342,9 @@ Rules:
SHOK: SHOK:
Buildable: Buildable:
Prerequisites: ~disabled Prerequisites: ~disabled
HIJACKER:
Buildable:
Prerequisites: ~disabled
STNK: STNK:
Buildable: Buildable:
Prerequisites: ~disabled Prerequisites: ~disabled