diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index baca42a510..255c71ec9e 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -1,6 +1,5 @@ #include "script_component.hpp" -ADDON = false; LOG(MSG_INIT); // Calculate the maximum zoom allowed for this map @@ -19,4 +18,11 @@ call FUNC(determineZoom); ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}]; }; -ADDON = true; +[ +["SettingsInitialized", { + // Start Blue Force Tracking if Enabled + if (GVAR(BFT_Enabled)) then { + GVAR(BFT_markers) = []; + [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index c156c9527d..44af71fbbd 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -24,7 +24,3 @@ GVAR(BFT_Enabled) = true; diag_log text "[ACE]: Blue Force Tracking Module initialized."; TRACE_2("[ACE]: Blue Force Tracking Module initialized.",GVAR(BFT_Interval), GVAR(BFT_HideAiGroups)); - -//start BFT: -GVAR(BFT_markers) = []; -[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 4bcdb69269..523b58131b 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -10,6 +10,8 @@ */ #include "script_component.hpp" +if !(hasInterface) exitWith {}; + PARAMS_3(_logic,_units,_activated); if !(_activated) exitWith {}; @@ -19,4 +21,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule); -diag_log text "[ACE]: Interaction Module Initialized."; +diag_log text "[ACE]: Map Module Initialized.";