Skip to content

Commit 44f147a

Browse files
committed
Fix weird behavior when opening/closing and clicking on map links
1 parent b68c814 commit 44f147a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Mappy/Controllers/IntegrationsController.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,13 @@ public void OpenOccupiedMap()
169169
private static void CenterOnMarker(MapMarkerBase marker) {
170170
var coordinates = new Vector2(marker.X, marker.Y) / 16.0f * DrawHelpers.GetMapScaleFactor() - DrawHelpers.GetMapOffsetVector();
171171

172-
System.MapWindow.ProcessingCommand = true;
172+
System.SystemConfig.FollowPlayer = false;
173173
System.MapRenderer.DrawOffset = -coordinates;
174+
175+
// If the map isn't open, we want to force it to not center on whatever the user decided and center on our markers instead.
176+
if (!System.MapWindow.IsOpen) {
177+
System.MapWindow.ProcessingCommand = true;
178+
}
174179
}
175180

176181
public static bool ShouldShowMap() {

0 commit comments

Comments
 (0)