mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update Controllable.lua
Added control to keep within limits of the options
This commit is contained in:
parent
9573d92cc0
commit
3e0db05664
@ -3669,7 +3669,10 @@ end
|
|||||||
function CONTROLLABLE:OptionAAAttackRange(range)
|
function CONTROLLABLE:OptionAAAttackRange(range)
|
||||||
self:F2( { self.ControllableName } )
|
self:F2( { self.ControllableName } )
|
||||||
-- defaults to 3
|
-- 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()
|
local DCSControllable = self:GetDCSObject()
|
||||||
if DCSControllable then
|
if DCSControllable then
|
||||||
local Controller = self:_GetController()
|
local Controller = self:_GetController()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user