Skip to content

Commit

Permalink
Use infoPanelComponents
Browse files Browse the repository at this point in the history
Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com>
  • Loading branch information
PabstMirror and johnb432 committed May 19, 2024
1 parent ae58674 commit b772c5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion addons/maptools/XEH_postInitClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
if (!hasInterface) exitWith {};

// Init variables
GVAR(gpsDevicesCache) = createHashMap;
GVAR(mapGpsShow) = true;
GVAR(mapGpsNextUpdate) = -1;

Expand Down
9 changes: 3 additions & 6 deletions addons/maptools/functions/fnc_canUseMapGPS.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

if (!visibleMap || {!alive ACE_player}) exitWith {false};

private _assignedGPS = ACE_player getSlotItemName TYPE_GPS;
if (_assignedGPS == "") exitwith { false };
private _panels = flatten (ACE_player infoPanelComponents "left");
private _index = _panels find "MinimapDisplayComponent";

GVAR(gpsDevicesCache) getOrDefaultCall [_assignedGPS, {
(_assignedGPS call BIS_fnc_itemType) params ["", "_type"];
_type in ["GPS", "UAVTerminal"]
}, true]
_index != -1 && {_panels select (_index + 1)}

0 comments on commit b772c5c

Please sign in to comment.