Fix a crash when completing objectives in Allies06 out of order
This commit is contained in:
@@ -45,7 +45,6 @@ ParadropWaypoints =
|
|||||||
}
|
}
|
||||||
|
|
||||||
SovietTechLabs = { TechLab1, TechLab2, TechLab3 }
|
SovietTechLabs = { TechLab1, TechLab2, TechLab3 }
|
||||||
TechLabCams = { TechCam1, TechCam2, TechCam3 }
|
|
||||||
|
|
||||||
GroupPatrol = function(units, waypoints, delay)
|
GroupPatrol = function(units, waypoints, delay)
|
||||||
local i = 1
|
local i = 1
|
||||||
@@ -115,19 +114,23 @@ CaptureRadarDome = function()
|
|||||||
|
|
||||||
Trigger.OnCapture(RadarDome, function()
|
Trigger.OnCapture(RadarDome, function()
|
||||||
player.MarkCompletedObjective(CaptureRadarDomeObj)
|
player.MarkCompletedObjective(CaptureRadarDomeObj)
|
||||||
Beacon.New(player, TechLab1.CenterPosition)
|
|
||||||
Beacon.New(player, TechLab2.CenterPosition)
|
Utils.Do(SovietTechLabs, function(a)
|
||||||
Beacon.New(player, TechLab3.CenterPosition)
|
if a.IsDead then
|
||||||
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Beacon.New(player, a.CenterPosition)
|
||||||
if Map.LobbyOption("difficulty") ~= "hard" then
|
if Map.LobbyOption("difficulty") ~= "hard" then
|
||||||
Utils.Do(TechLabCams, function(a)
|
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location + CVec.New(1, 1) })
|
||||||
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location })
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Map.LobbyOption("difficulty") == "easy" then
|
||||||
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
|
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,10 @@ Players:
|
|||||||
Faction: england
|
Faction: england
|
||||||
PlayerReference@USSR:
|
PlayerReference@USSR:
|
||||||
Name: USSR
|
Name: USSR
|
||||||
|
Bot: campaign
|
||||||
Faction: soviet
|
Faction: soviet
|
||||||
Color: FF1400
|
Color: FF1400
|
||||||
Enemies: USSR, Greece
|
Enemies: USSR, Greece
|
||||||
Bot: campaign
|
|
||||||
PlayerReference@Greece:
|
PlayerReference@Greece:
|
||||||
Name: Greece
|
Name: Greece
|
||||||
AllowBots: False
|
AllowBots: False
|
||||||
@@ -589,15 +589,6 @@ Actors:
|
|||||||
Weapcam: waypoint
|
Weapcam: waypoint
|
||||||
Location: 76,94
|
Location: 76,94
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
TechCam1: waypoint
|
|
||||||
Location: 69,83
|
|
||||||
Owner: Neutral
|
|
||||||
TechCam2: waypoint
|
|
||||||
Location: 94,94
|
|
||||||
Owner: Neutral
|
|
||||||
TechCam3: waypoint
|
|
||||||
Owner: Neutral
|
|
||||||
Location: 94,109
|
|
||||||
AlliedEntry1: waypoint
|
AlliedEntry1: waypoint
|
||||||
Location: 19,61
|
Location: 19,61
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ ParadropWaypoints =
|
|||||||
|
|
||||||
SovietTechLabs = { TechLab1, TechLab2 }
|
SovietTechLabs = { TechLab1, TechLab2 }
|
||||||
|
|
||||||
TechLabCams = { TechCam1, TechCam2 }
|
|
||||||
|
|
||||||
GroupPatrol = function(units, waypoints, delay)
|
GroupPatrol = function(units, waypoints, delay)
|
||||||
local i = 1
|
local i = 1
|
||||||
local stop = false
|
local stop = false
|
||||||
@@ -126,18 +124,23 @@ CaptureRadarDome = function()
|
|||||||
|
|
||||||
Trigger.OnCapture(RadarDome, function()
|
Trigger.OnCapture(RadarDome, function()
|
||||||
player.MarkCompletedObjective(CaptureRadarDomeObj)
|
player.MarkCompletedObjective(CaptureRadarDomeObj)
|
||||||
Beacon.New(player, TechLab1.CenterPosition)
|
|
||||||
Beacon.New(player, TechLab2.CenterPosition)
|
Utils.Do(SovietTechLabs, function(a)
|
||||||
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
|
if a.IsDead then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Beacon.New(player, a.CenterPosition)
|
||||||
if Map.LobbyOption("difficulty") ~= "hard" then
|
if Map.LobbyOption("difficulty") ~= "hard" then
|
||||||
Utils.Do(TechLabCams, function(a)
|
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location + CVec.New(1, 1) })
|
||||||
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location })
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Map.LobbyOption("difficulty") == "easy" then
|
||||||
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
|
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ Players:
|
|||||||
Faction: england
|
Faction: england
|
||||||
PlayerReference@USSR:
|
PlayerReference@USSR:
|
||||||
Name: USSR
|
Name: USSR
|
||||||
|
Bot: campaign
|
||||||
Faction: soviet
|
Faction: soviet
|
||||||
Color: FF1400
|
Color: FF1400
|
||||||
Enemies: Greece
|
Enemies: Greece
|
||||||
Bot: campaign
|
|
||||||
PlayerReference@Greece:
|
PlayerReference@Greece:
|
||||||
Name: Greece
|
Name: Greece
|
||||||
AllowBots: False
|
AllowBots: False
|
||||||
@@ -586,12 +586,6 @@ Actors:
|
|||||||
SovietDefenseCam: waypoint
|
SovietDefenseCam: waypoint
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Location: 49,91
|
Location: 49,91
|
||||||
TechCam1: waypoint
|
|
||||||
Owner: Neutral
|
|
||||||
Location: 55,58
|
|
||||||
TechCam2: waypoint
|
|
||||||
Owner: Neutral
|
|
||||||
Location: 91,43
|
|
||||||
Weapcam: waypoint
|
Weapcam: waypoint
|
||||||
Owner: Neutral
|
Owner: Neutral
|
||||||
Location: 53,47
|
Location: 53,47
|
||||||
|
|||||||
Reference in New Issue
Block a user