From 5f9a732101eac23ae2e86db09f935f5c9c45620c Mon Sep 17 00:00:00 2001 From: Valmo Trindade Date: Tue, 30 Jul 2024 13:52:10 -0300 Subject: [PATCH] refactored init function --- addons/main/functions/fn_init.sqf | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/addons/main/functions/fn_init.sqf b/addons/main/functions/fn_init.sqf index 5656db7..3603a8c 100644 --- a/addons/main/functions/fn_init.sqf +++ b/addons/main/functions/fn_init.sqf @@ -15,15 +15,18 @@ if (_activated) exitWith { _atak_fts_fulladdress = _atak_fts_protocol + ":" + "/" + "/" + _atak_fts_address + ":" + (str _atak_fts_port); _atak_fts_bearer_token = _logic getVariable "armatak_module_fts_api_instance_token"; - missionNamespace setVariable ["_atak_server_instance",_atak_fts_fulladdress]; - missionNamespace setVariable ["_atak_server_instance_token",_atak_fts_bearer_token]; + missionNamespace setVariable ["_atak_server_instance", _atak_fts_fulladdress]; + missionNamespace setVariable ["_atak_server_instance_token", _atak_fts_bearer_token]; - [{ - _uid = _x getVariable "_atak_uid"; - if (isNull _uid) then { - player call armatak_fnc_postGeoObject; - } else { - player call armatak_fnc_putGeoObject; - }; - },2,[]] call CBA_fnc_addPerFrameHandler; + { + [{ + _uid = _x getVariable "_atak_uid"; + + if (isNull _uid) then { + _x call armatak_fnc_postGeoObject; + } else { + _x call armatak_fnc_putGeoObject; + }; + }, 2, []] call CBA_fnc_addPerFrameHandler; + } forEach playableUnits; }; \ No newline at end of file