Controllable - add option prefer vertical landing

Addrd
This commit is contained in:
Thomas 2025-07-09 12:14:41 +02:00 committed by GitHub
parent da70f4ce6c
commit 926a0733e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3629,6 +3629,26 @@ function CONTROLLABLE:OptionROTPassiveDefense()
return nil
end
--- Helicopter - prefer vertical landing.
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionPreferVerticalLanding()
self:F2( { self.ControllableName } )
local DCSControllable = self:GetDCSObject()
if DCSControllable then
local Controller = self:_GetController()
if self:IsAir() then
Controller:setOption( AI.Option.Air.id.PREFER_VERTICAL, true )
end
return self
end
return nil
end
--- Can the CONTROLLABLE evade on enemy fire?
-- @param #CONTROLLABLE self
-- @return #boolean