Fix for VHF Beacons

This commit is contained in:
Ciaran Fisher
2015-06-11 19:07:09 +01:00
parent 4f6d32be16
commit 9b0e6314fc
3 changed files with 56 additions and 48 deletions
+10 -2
View File
@@ -1761,6 +1761,7 @@ function ctld.updateRadioBeacon(_vhfFrequency, _vhfGroupName, _uhfFrequency,_uhf
for _,_radio in pairs(_radioLoop) do
if _radio.silent then
local _setFrequency = {
["enabled"] = true,
["auto"] = false,
@@ -1797,7 +1798,7 @@ function ctld.updateRadioBeacon(_vhfFrequency, _vhfGroupName, _uhfFrequency,_uhf
["id"] = "TransmitMessage",
["params"] = {
["loop"] = true, --false works too
["subtitle"] = _radioText, --_text
["subtitle"] = "", --_text
["duration"] = 60, -- reset every 60 seconds --used to have timer.getTime() +60
["file"] = _sound,
},
@@ -1817,8 +1818,15 @@ function ctld.updateRadioBeacon(_vhfFrequency, _vhfGroupName, _uhfFrequency,_uhf
_groupController:setOption(AI.Option.Ground.id.ROE, AI.Option.Ground.val.ROE.WEAPON_HOLD)
--env.info("Radio Beacon: ".. _text)
else
-- Above function doesnt work for simulating VHF in multiplayer but DOES in single player.... WHY DCS WHY!?!?!
-- trigger.action.radioTransmission(ctld.radioSoundShort, _vhfGroup:getUnit(1):getPoint(), _radio.mode, false, _radio.freq, 1000)
trigger.action.radioTransmission(ctld.radioSound, _vhfGroup:getUnit(1):getPoint(), _radio.mode, false, _radio.freq, 1000)
--This function doesnt actually stop transmitting when then sound is false. My hope is it will stop if a new beacon is created on the same
-- frequency... OR they fix the bug where it wont stop.
end
--
end
return true
Binary file not shown.
BIN
View File
Binary file not shown.