mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
First version of AI_A2G_DISPATCHER ...
- Created a new AI_AIR class. AI_A2A and AI_A2G inherit from AI_AIR. - Created a new AI_A2G_DISPATCHER class. - Created a new AI_A2G_ENGAGE class, that implements the SEAD, CAS and BAI actions. - The AI_A2G_DISPATCHER implements now: * SEAD, CAS and BAI attacks from airbases. * AddDefenseCoordinate() to set a defense coordinate. * RemoveDefenseCoordinate() to remove a defense coordinate. * SetDefenseReactivenessHigh() for high reactiveness. * SetDefenseReactivenessMedium() for medium reactiveness. * SetDefenseReactivenessLow() for low reactiveness. * Overhead for ground attacks. * Grouping for ground attacks. * Evaluates task type based on enemy group composition. - Tested AI_A2A_DISPATCHER for backward compatibility. - Implemented spawning of airplanes in AI_A2A_DISPATCHER: * SetSquadronVisible() method to make the squadron visible at the airport.
This commit is contained in:
@@ -327,6 +327,8 @@ do -- DETECTION_BASE
|
||||
self:InitDetectIRST( nil )
|
||||
self:InitDetectDLINK( nil )
|
||||
|
||||
self:SetFriendliesRange( 6000 )
|
||||
|
||||
self:FilterCategories( {
|
||||
Unit.Category.AIRPLANE,
|
||||
Unit.Category.GROUND_UNIT,
|
||||
@@ -1356,7 +1358,6 @@ do -- DETECTION_BASE
|
||||
if FoundUnitCoalition ~= EnemyCoalition and FoundUnitInReportSetGroup == false then
|
||||
local FriendlyUnit = UNIT:Find( FoundDCSUnit )
|
||||
local FriendlyUnitName = FriendlyUnit:GetName()
|
||||
local FriendlyUnitCategory = FriendlyUnit:GetDesc().category
|
||||
|
||||
-- Friendlies are sorted per unit category.
|
||||
DetectedItem.FriendliesNearBy = DetectedItem.FriendliesNearBy or {}
|
||||
@@ -1385,7 +1386,7 @@ do -- DETECTION_BASE
|
||||
|
||||
if PlayerUnit and PlayerUnit:IsInZone(DetectionZone) then
|
||||
|
||||
local PlayerUnitCategory = PlayerUnit:GetDesc().category
|
||||
local PlayerUnitCategory = PlayerUnit:GetUnitCategory()
|
||||
|
||||
if ( not self.FriendliesCategory ) or ( self.FriendliesCategory and ( self.FriendliesCategory == PlayerUnitCategory ) ) then
|
||||
|
||||
@@ -1472,7 +1473,7 @@ do -- DETECTION_BASE
|
||||
local DetectedUnit = UNIT:FindByName( ObjectName )
|
||||
if DetectedUnit and DetectedUnit:IsAlive() then
|
||||
if self:IsDetectedObjectIdentified( DetectedObject ) == false then
|
||||
--self:F( { DetectedObject = DetectedObject } )
|
||||
self:F( { DetectedObject = DetectedObject } )
|
||||
return DetectedObject
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user