mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-21 02:31:39 +00:00
Merge pull request #778 from Mongrelf/master
AI_A2A_Dispatcher CountCapAirborne and Detection Change for AcceptZones
This commit is contained in:
@@ -2504,7 +2504,8 @@ do -- AI_A2A_DISPATCHER
|
|||||||
if AIGroup:IsAlive() then
|
if AIGroup:IsAlive() then
|
||||||
-- Check if the CAP is patrolling or engaging. If not, this is not a valid CAP, even if it is alive!
|
-- Check if the CAP is patrolling or engaging. If not, this is not a valid CAP, even if it is alive!
|
||||||
-- The CAP could be damaged, lost control, or out of fuel!
|
-- The CAP could be damaged, lost control, or out of fuel!
|
||||||
if DefenderTask.Fsm:Is( "Patrolling" ) or DefenderTask.Fsm:Is( "Engaging" ) or DefenderTask.Fsm:Is( "Refuelling" )then
|
if DefenderTask.Fsm:Is( "Patrolling" ) or DefenderTask.Fsm:Is( "Engaging" ) or DefenderTask.Fsm:Is( "Refuelling" )
|
||||||
|
or DefenderTask.Fsm:Is( "Started" ) then
|
||||||
CapCount = CapCount + 1
|
CapCount = CapCount + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -617,12 +617,16 @@ do -- DETECTION_BASE
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.AcceptZones then
|
if self.AcceptZones then
|
||||||
|
local AnyZoneDetection = false
|
||||||
for AcceptZoneID, AcceptZone in pairs( self.AcceptZones ) do
|
for AcceptZoneID, AcceptZone in pairs( self.AcceptZones ) do
|
||||||
local AcceptZone = AcceptZone -- Core.Zone#ZONE_BASE
|
local AcceptZone = AcceptZone -- Core.Zone#ZONE_BASE
|
||||||
if AcceptZone:IsVec2InZone( DetectedObjectVec2 ) == false then
|
if AcceptZone:IsVec2InZone( DetectedObjectVec2 ) then
|
||||||
DetectionAccepted = false
|
AnyZoneDetection = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if not AnyZoneDetection then
|
||||||
|
DetectionAccepted = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.RejectZones then
|
if self.RejectZones then
|
||||||
|
|||||||
Reference in New Issue
Block a user