mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Altitude was wrongly set in patrol
This commit is contained in:
parent
fb54b2f280
commit
a646dd900d
@ -909,11 +909,8 @@ do -- AI_A2A_DISPATCHER
|
||||
|
||||
local DefenderSquadron = self.DefenderSquadrons[SquadronName]
|
||||
|
||||
self:E( { AirbaseName = AirbaseName } )
|
||||
DefenderSquadron.Name = SquadronName
|
||||
DefenderSquadron.Airbase = AIRBASE:FindByName( AirbaseName )
|
||||
self:E( { Airbase = DefenderSquadron.Airbase } )
|
||||
self:E( { AirbaseObject = DefenderSquadron.Airbase:GetDCSObject() } )
|
||||
|
||||
DefenderSquadron.Spawn = {}
|
||||
if type( SpawnTemplates ) == "string" then
|
||||
|
||||
@ -347,6 +347,7 @@ function AI_A2A_PATROL:onafterRoute( AIGroup, From, Event, To )
|
||||
local CurrentCoord = AIGroup:GetCoordinate()
|
||||
|
||||
local ToTargetCoord = self.PatrolZone:GetRandomPointVec2()
|
||||
ToTargetCoord:SetAlt(math.random( self.PatrolFloorAltitude,self.PatrolCeilingAltitude ) )
|
||||
self:SetTargetDistance( ToTargetCoord ) -- For RTB status check
|
||||
|
||||
local ToTargetSpeed = math.random( self.PatrolMinSpeed, self.PatrolMaxSpeed )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user