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>
This commit is contained in:
PabstMirror 2024-05-21 18:25:59 -05:00 committed by GitHub
parent b26d6543a6
commit a31608073e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)}