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:
@@ -2367,7 +2367,7 @@ do -- SET_UNIT
|
||||
local HasSEAD = UnitSEAD:HasSEAD()
|
||||
|
||||
self:T3(HasSEAD)
|
||||
if HasSEAD then
|
||||
if HasSEAD == true then
|
||||
SEADCount = SEADCount + 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1702,7 +1702,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
|
||||
-- When spawned in the air, we need to generate a Takeoff Event.
|
||||
if Takeoff == GROUP.Takeoff.Air then
|
||||
for UnitID, UnitSpawned in pairs( GroupSpawned:GetUnits() ) do
|
||||
SCHEDULER:New( nil, BASE.CreateEventTakeoff, { GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject() } , 1 )
|
||||
SCHEDULER:New( nil, BASE.CreateEventTakeoff, { GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject() } , 5 )
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2005,10 +2005,10 @@ end
|
||||
function SPAWN:InitUnControlled( UnControlled )
|
||||
self:F2( { self.SpawnTemplatePrefix, UnControlled } )
|
||||
|
||||
self.SpawnUnControlled = UnControlled
|
||||
self.SpawnUnControlled = UnControlled or true
|
||||
|
||||
for SpawnGroupID = 1, self.SpawnMaxGroups do
|
||||
self.SpawnGroups[SpawnGroupID].UnControlled = UnControlled
|
||||
self.SpawnGroups[SpawnGroupID].UnControlled = self.SpawnUnControlled
|
||||
end
|
||||
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user