mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Qol
This commit is contained in:
@@ -3895,10 +3895,14 @@ do -- AI_A2G_DISPATCHER
|
||||
|
||||
if Squadron then
|
||||
local FirstUnit = AttackSetUnit:GetRandomSurely()
|
||||
if FirstUnit then
|
||||
local Coordinate = FirstUnit:GetCoordinate() -- Core.Point#COORDINATE
|
||||
if self.SetSendPlayerMessages then
|
||||
Dispatcher:MessageToPlayers( Squadron, DefenderName .. ", on route to ground target at " .. Coordinate:ToStringA2G( DefenderGroup ), DefenderGroup )
|
||||
end
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
self:GetParent(self).onafterEngageRoute( self, DefenderGroup, From, Event, To, AttackSetUnit )
|
||||
end
|
||||
|
||||
@@ -426,7 +426,12 @@ function AI_AIR_ENGAGE:onafterEngageRoute( DefenderGroup, From, Event, To, Attac
|
||||
local DefenderCoord = DefenderGroup:GetPointVec3()
|
||||
DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude.
|
||||
|
||||
local TargetCoord = AttackSetUnit:GetRandomSurely():GetPointVec3()
|
||||
local TargetUnit = AttackSetUnit:GetRandomSurely()
|
||||
local TargetCoord = nil
|
||||
|
||||
if TargetUnit then
|
||||
TargetUnit:GetPointVec3()
|
||||
end
|
||||
|
||||
if TargetCoord == nil then
|
||||
self:Return()
|
||||
@@ -522,7 +527,12 @@ function AI_AIR_ENGAGE:onafterEngage( DefenderGroup, From, Event, To, AttackSetU
|
||||
local DefenderCoord = DefenderGroup:GetPointVec3()
|
||||
DefenderCoord:SetY( EngageAltitude ) -- Ground targets don't have an altitude.
|
||||
|
||||
local TargetCoord = AttackSetUnit:GetRandomSurely():GetPointVec3()
|
||||
local TargetCoord = nil
|
||||
|
||||
local TargetUnit = AttackSetUnit:GetRandomSurely()
|
||||
if TargetUnit then
|
||||
TargetCoord=TargetUnit:GetPointVec3()
|
||||
end
|
||||
if not TargetCoord then
|
||||
self:Return()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user