Fix reinforcements appearing in soviet04a/b despite killed radar dome

This commit is contained in:
Oliver Brakmann
2015-11-11 21:48:36 +01:00
parent ef1e217a2a
commit c8a517713d
2 changed files with 52 additions and 36 deletions

View File

@@ -31,6 +31,10 @@ AttackPaths =
}
ReinfInf = function()
if Radar.IsDead or Radar.Owner ~= Greece then
return
end
Reinforcements.Reinforce(Greece, InfantryReinfGreece, InfReinfPath, 0, function(soldier)
soldier.Hunt()
end)
@@ -46,12 +50,15 @@ ReinfArmor = function()
end
BringPatrol1 = function()
if Radar.IsDead or Radar.Owner ~= Greece then
return
end
local units = Reinforcements.Reinforce(Greece, Patrol1Group, { SWRoadPoint.Location }, 0)
Utils.Do(units, function(patrols)
patrols.Patrol(Patrol1Path, true, 250)
end)
if not Radar.IsDead and Radar.Owner == Greece then
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
@@ -60,15 +67,17 @@ BringPatrol1 = function()
end
end)
end
end
BringPatrol2 = function()
if Radar.IsDead or Radar.Owner ~= Greece then
return
end
local units = Reinforcements.Reinforce(Greece, Patrol2Group, { NRoadPoint.Location }, 0)
Utils.Do(units, function(patrols)
patrols.Patrol(Patrol2Path, true, 250)
end)
if not Radar.IsDead and Radar.Owner == Greece then
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
@@ -77,4 +86,3 @@ BringPatrol2 = function()
end
end)
end
end

View File

@@ -31,6 +31,10 @@ AttackPaths =
}
ReinfInf = function()
if Radar.IsDead or Radar.Owner ~= Greece then
return
end
Reinforcements.Reinforce(Greece, InfantryReinfGreece, InfReinfPath, 0, function(soldier)
soldier.Hunt()
end)
@@ -46,12 +50,15 @@ ReinfArmor = function()
end
BringPatrol1 = function()
if Radar.IsDead or Radar.Owner ~= Greece then
return
end
local units = Reinforcements.Reinforce(Greece, Patrol1Group, { NRoadPoint.Location }, 0)
Utils.Do(units, function(patrols)
patrols.Patrol(Patrol1Path, true, 250)
end)
if not Radar.IsDead and Radar.Owner == Greece then
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
@@ -60,15 +67,17 @@ BringPatrol1 = function()
end
end)
end
end
BringPatrol2 = function()
if Radar.IsDead or Radar.Owner ~= Greece then
return
end
local units = Reinforcements.Reinforce(Greece, Patrol2Group, { NRoadPoint.Location }, 0)
Utils.Do(units, function(patrols)
patrols.Patrol(Patrol2Path, true, 250)
end)
if not Radar.IsDead and Radar.Owner == Greece then
Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
@@ -77,4 +86,3 @@ BringPatrol2 = function()
end
end)
end
end