This commit is contained in:
FlightControl
2017-05-31 18:58:34 +02:00
parent 0af5e1428b
commit a3289205e6
10 changed files with 814 additions and 711 deletions

View File

@@ -379,11 +379,11 @@ end
-- @param #string From The From State string.
-- @param #string Event The Event string.
-- @param #string To The To State string.
function AI_A2A_CAP:onafterEngage( AIGroup, From, Event, To, AttackUnits )
function AI_A2A_CAP:onafterEngage( AIGroup, From, Event, To, AttackSetUnit )
self:F( { AIGroup, From, Event, To, AttackUnits} )
self:F( { AIGroup, From, Event, To, AttackSetUnit} )
self.AttackUnits = AttackUnits or self.AttackUnits
self.AttackSetUnit = AttackSetUnit or self.AttackSetUnit -- Core.Set#SET_UNIT
if AIGroup:IsAlive() then
@@ -435,7 +435,7 @@ function AI_A2A_CAP:onafterEngage( AIGroup, From, Event, To, AttackUnits )
local AttackTasks = {}
for AttackUnitID, AttackUnit in pairs( self.AttackUnits ) do
for AttackUnitID, AttackUnit in pairs( self.AttackSetUnit:GetSet() ) do
local AttackUnit = AttackUnit -- Wrapper.Unit#UNIT
self:T( { AttackUnit, AttackUnit:IsAlive(), AttackUnit:IsAir() } )
if AttackUnit:IsAlive() and AttackUnit:IsAir() then