From af2eb08e8031ec23e0d307775ae7e739dc5e7c7e Mon Sep 17 00:00:00 2001 From: AdozenBABYdogs Date: Fri, 10 Nov 2023 19:42:22 +0200 Subject: [PATCH] resolving bug fixfor JVMF messages not displaying https://github.com/Project-Hatchet/H-60/issues/354 # Conflicts: # addons/uh60_jvmf/functions/fnc_drawJVMF.sqf Fixing JVMF from an earlier stage --- addons/uh60_jvmf/functions/fnc_drawJVMF.sqf | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/addons/uh60_jvmf/functions/fnc_drawJVMF.sqf b/addons/uh60_jvmf/functions/fnc_drawJVMF.sqf index c9223f7d..c693c64a 100644 --- a/addons/uh60_jvmf/functions/fnc_drawJVMF.sqf +++ b/addons/uh60_jvmf/functions/fnc_drawJVMF.sqf @@ -6,6 +6,9 @@ */ params ["_vehicle"]; +//Do not draw JVMF is there are no JVMF Messages +if (count VTX_JVMF_MESSAGES == 0) exitWith {}; + private _fixString = { params ["_str", "_length"]; private _str = _str select [0,_length]; @@ -46,15 +49,7 @@ private _strings = [ } forEach VTX_JVMF_MESSAGES; private _message = VTX_JVMF_MESSAGES # VTX_JVMF_SELECTED_IDX; -if (count VTX_JVMF_MESSAGES == 0) then{ - _type = 0; - _sender = "Debug"; - _recipient = "Test"; - _text = ""; - _repilies = 0; -} else { - _message params ["_ID", "_sender", "_recipient", "_type", "_text", "_data", "_replies"]; -} +_message params ["_ID", "_sender", "_recipient", "_type", "_text", "_data", "_replies"]; _vehicle setUserMFDValue [16, _type]; [_vehicle, 30, _sender + "/" + _recipient] call vtx_uh60_mfd_fnc_setUserText; @@ -86,7 +81,4 @@ if (count _replies > 0) then { }; private _messageCount = count VTX_JVMF_MESSAGES; -if (count VTX_JVMF_MESSAGES == 0) then { - _messageCount = 1; -} [_vehicle, 42, format["%1/%2", VTX_JVMF_SELECTED_IDX + 1, count VTX_JVMF_MESSAGES]] call vtx_uh60_mfd_fnc_setUserText;