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
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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

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