Update Controllable.lua

Added control to keep within limits of the options
This commit is contained in:
Applevangelist
2020-11-22 13:01:26 +01:00
committed by GitHub
parent 9573d92cc0
commit 3e0db05664

View File

@@ -3669,7 +3669,10 @@ end
function CONTROLLABLE:OptionAAAttackRange(range)
self:F2( { self.ControllableName } )
-- defaults to 3
local range = range or 3
local range = range or 3
if range < 0 or range > 4 then
range = 3
end
local DCSControllable = self:GetDCSObject()
if DCSControllable then
local Controller = self:_GetController()