mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-16 14:12:47 +00:00
#CONTROLLABLE - Make waypoint function a bit more robust
This commit is contained in:
@@ -2184,7 +2184,8 @@ function CONTROLLABLE:TaskFunction( FunctionString, ... )
|
||||
local ArgumentKey = '_' .. tostring( arg ):match( "table: (.*)" )
|
||||
self:SetState( self, ArgumentKey, arg )
|
||||
DCSScript[#DCSScript + 1] = "local Arguments = MissionControllable:GetState( MissionControllable, '" .. ArgumentKey .. "' ) "
|
||||
DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, unpack( Arguments ) )"
|
||||
--DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, unpack( Arguments ) )"
|
||||
DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, ((type(Arguments)=='table') and unpack(Arguments) or nil))"
|
||||
else
|
||||
DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable )"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user