From d84b22f0efa221056cf01bfa9c22c256664c79c4 Mon Sep 17 00:00:00 2001 From: Beu Date: Mon, 25 Sep 2023 21:17:04 +0200 Subject: [PATCH] hide marker when GUIPlayer is null --- TM_ClimbTheMap.Script.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/TM_ClimbTheMap.Script.txt b/TM_ClimbTheMap.Script.txt index 9f21f47..5266975 100644 --- a/TM_ClimbTheMap.Script.txt +++ b/TM_ClimbTheMap.Script.txt @@ -647,18 +647,24 @@ main() { declare Integer I; + declare Boolean OwnerIsPassed; + foreach (Name => Altitude in Net_ClimbTheMap_AltitudePerName) { if (!LiveMarkers.existskey(I)) break; if (OwnerName == Name) { UpdateMarker(Frame_Marker_Owner, Net_ClimbTheMap_AltitudeOfWaypoints, AnimationDuration, C_Type_Owner, Name, Altitude); - + OwnerIsPassed = True; } else { UpdateMarker(LiveMarkers[I], Net_ClimbTheMap_AltitudeOfWaypoints, AnimationDuration, C_Type_Live, Name, Altitude); I += 1; } - } + } + + if (!OwnerIsPassed) { + Frame_Marker_Owner.Visible = False; + } while (LiveMarkers.existskey(I) && LiveMarkers[I].Visible) { LiveMarkers[I].Visible = False;