From a31608073edb40d7d1ad6e16bbc4a92ad5749279 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 21 May 2024 18:25:59 -0500 Subject: [PATCH] Maptools - Fix gps detection (#10007) * Maptools - Fix gps detection * Use `infoPanelComponents` Co-Authored-By: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --- addons/maptools/functions/fnc_canUseMapGPS.sqf | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 0bdd0d0ea6..e9ca813288 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -17,8 +17,7 @@ if (!visibleMap || {!alive ACE_player}) exitWith {false}; -private _gpsOpened = visibleGPS; -private _gpsAvailable = openGPS true; -if (!_gpsOpened) then {openGPS false}; +private _panels = flatten (ACE_player infoPanelComponents "left"); +private _index = _panels find "MinimapDisplayComponent"; -_gpsAvailable // return +_index != -1 && {_panels select (_index + 1)}