From f76b0dc7d363581621a107244c8cd1f4f34052c3 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Fri, 9 Nov 2018 16:47:06 +0100 Subject: [PATCH] Select correct template to engage is working now also. --- Moose Development/Moose/AI/AI_A2G_Dispatcher.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua b/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua index 33b855f9c..dca7c2086 100644 --- a/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua +++ b/Moose Development/Moose/AI/AI_A2G_Dispatcher.lua @@ -2207,7 +2207,7 @@ do -- AI_A2G_DISPATCHER --- -- @param #AI_A2G_DISPATCHER self - function AI_A2G_DISPATCHER:CountDefenders( AttackerDetection, DefenderCount ) + function AI_A2G_DISPATCHER:CountDefenders( AttackerDetection, DefenderCount, DefenderTaskType ) local Friendlies = nil @@ -2225,8 +2225,8 @@ do -- AI_A2G_DISPATCHER -- Now we need to check if the AIGroup has a Task. local DefenderTask = self:GetDefenderTask( FriendlyGroup ) if DefenderTask then - -- The Task should be SEAD - if true then -- TODO: fix this to the correct DefenderTaskType + -- The Task should be of the same type. + if DefenderTaskType == DefenderTask.Type then -- If there is no target, then add the AIGroup to the ResultAIGroups for Engagement to the AttackerSet if DefenderTask.Target == nil then if DefenderTask.Fsm:Is( "Returning" )