Merge pull request #8243 from abcdefg30/capturecontrol
Fixed captured buildings producing bot controled units
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2342,6 +2342,9 @@ Rules:
|
||||
SHOK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
HIJACKER:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
STNK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
Reference in New Issue
Block a user