diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index ef528d5233..b85d91bf16 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -98,4 +98,15 @@ call FUNC(determineZoom); }] call EFUNC(common,addEventHandler); }; }; -}] call EFUNC(common,addEventHandler); \ No newline at end of file +}] call EFUNC(common,addEventHandler); + +// hide clock on map if player has no watch +GVAR(hasWatch) = true; + +["playerInventoryChanged", { + if (isNull (_this select 0)) exitWith { + GVAR(hasWatch) = true; + }; + + GVAR(hasWatch) = "ItemWatch" in (_this select 1 select 17); +}] call ace_common_fnc_addEventhandler diff --git a/addons/map/functions/fnc_onDrawMap.sqf b/addons/map/functions/fnc_onDrawMap.sqf index 0c95e903e6..cc0824919a 100644 --- a/addons/map/functions/fnc_onDrawMap.sqf +++ b/addons/map/functions/fnc_onDrawMap.sqf @@ -4,6 +4,4 @@ ((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates); // hide time when no map in inventory -if (!isNull ACE_player) then { - ((_this select 0) displayCtrl 101) ctrlShow ("ItemWatch" in assignedItems ACE_player); -}; +((_this select 0) displayCtrl 101) ctrlShow GVAR(hasWatch);