diff --git a/addons/minedetector/XEH_preInit.sqf b/addons/minedetector/XEH_preInit.sqf index b47cf6628db..3641c78b702 100644 --- a/addons/minedetector/XEH_preInit.sqf +++ b/addons/minedetector/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +GVAR(detectableClasses) = +(uiNamespace getVariable QGVAR(detectableClasses)); + ADDON = true; diff --git a/addons/minedetector/functions/fnc_getDetectedObject.sqf b/addons/minedetector/functions/fnc_getDetectedObject.sqf index 7811b3eaaa8..8cc95ac4226 100644 --- a/addons/minedetector/functions/fnc_getDetectedObject.sqf +++ b/addons/minedetector/functions/fnc_getDetectedObject.sqf @@ -43,7 +43,7 @@ private _distance = -1; }; // If an object was detected, exit the search - if ((typeOf _x) in (uiNamespace getVariable QGVAR(detectableClasses))) exitWith { + if ((typeOf _x) in GVAR(detectableClasses)) exitWith { _isDetectable = true; _distance = _detectorPointAGL distance _x; _mine = _x;