From 4563e7e30033cba5f5de027845896b4d3941f4f6 Mon Sep 17 00:00:00 2001 From: Grey-Echo Date: Wed, 22 Mar 2017 10:22:04 +0100 Subject: [PATCH] in RADIO, use the MOOSE way to setCommand() self.Positionable:GetDCSObject():getController():setCommand() => self.Positionable:SetCommand() --- Moose Development/Moose/Core/Radio.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Moose Development/Moose/Core/Radio.lua b/Moose Development/Moose/Core/Radio.lua index 8bc26a11a..bb4daccf8 100644 --- a/Moose Development/Moose/Core/Radio.lua +++ b/Moose Development/Moose/Core/Radio.lua @@ -142,7 +142,7 @@ function RADIO:SetFrequency(Frequency) self.Frequency = Frequency * 1000000 -- Conversion in Hz -- If the RADIO is attached to a UNIT or a GROUP, we need to send the DCS Command "SetFrequency" to change the UNIT or GROUP frequency if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then - self.Positionable:GetDCSObject():getController():setCommand({ + self.Positionable:SetCommand({ id = "SetFrequency", params = { frequency = self.Frequency, @@ -292,7 +292,7 @@ function RADIO:Broadcast() -- If the POSITIONABLE is actually a UNIT or a GROUP, use the more complicated DCS command system if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then self:T2("Broadcasting from a UNIT or a GROUP") - self.Positionable:GetDCSObject():getController():setCommand({ + self.Positionable:SetCommand({ id = "TransmitMessage", params = { file = self.FileName, @@ -319,7 +319,7 @@ function RADIO:StopBroadcast() self:F() -- If the POSITIONABLE is a UNIT or a GROUP, stop the transmission with the DCS "StopTransmission" command if self.Positionable.ClassName == "UNIT" or self.Positionable.ClassName == "GROUP" then - self.Positionable:GetDCSObject():getController():setCommand({ + self.Positionable:SetCommand({ id = "StopTransmission", params = {} })