Merge pull request #2331 from FlightControl-Master/Applevangelist-patch-2

Update Controllable.lua
This commit is contained in:
Thomas 2025-07-09 12:16:29 +02:00 committed by GitHub
commit f0a4c5b008
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