Added JTAC to DETECTION_DISPATCHER

Added Process_JTAC to coordinate this activity during a CAS or BAI.
Removed TASK_CAS and TASK BAI into a generic TASK_A2G task.
This commit is contained in:
FlightControl
2016-07-21 15:28:53 +02:00
parent 8e8fcef266
commit 2eeaf7b92d
56 changed files with 1440 additions and 1280 deletions

View File

@@ -434,7 +434,7 @@ do -- DETECTION_DISPATCHER
if not CASTask then
local TargetSetUnit = self:EvaluateCAS( DetectedArea ) -- Returns a SetUnit if there are targets to be SEADed...
if TargetSetUnit then
CASTask = Mission:AddTask( TASK_CAS:New( Mission, self.SetGroup, "CAS." .. AreaID, TargetSetUnit , DetectedZone ) ):StatePlanned()
CASTask = Mission:AddTask( TASK_A2G:New( Mission, self.SetGroup, "CAS." .. AreaID, "CAS", TargetSetUnit , DetectedZone, DetectedArea.NearestFAC ) ):StatePlanned()
end
end
if CASTask and CASTask:IsStatePlanned() then
@@ -448,7 +448,7 @@ do -- DETECTION_DISPATCHER
if not BAITask then
local TargetSetUnit = self:EvaluateBAI( DetectedArea, self.CommandCenter:GetCoalition() ) -- Returns a SetUnit if there are targets to be SEADed...
if TargetSetUnit then
BAITask = Mission:AddTask( TASK_BAI:New( Mission, self.SetGroup, "BAI." .. AreaID, TargetSetUnit , DetectedZone ) ):StatePlanned()
BAITask = Mission:AddTask( TASK_A2G:New( Mission, self.SetGroup, "BAI." .. AreaID, "BAI", TargetSetUnit , DetectedZone, DetectedArea.NearestFAC ) ):StatePlanned()
end
end
if BAITask and BAITask:IsStatePlanned() then