diff --git a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs index da39620a37b..d3b1438356a 100644 --- a/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs +++ b/Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs @@ -397,7 +397,7 @@ private void DrawDocks(DrawingHandleScreen handle, EntityUid uid, Matrix3x2 grid } // Frontier: draw dock labels (done last to appear on top of all docks, still fights with other grids) - var labeled = new HashSet(); // Frontier + var labeled = new HashSet(); foreach (var state in docks) { if (state.LabelName == null || labeled.Contains(state.LabelName)) @@ -406,10 +406,7 @@ private void DrawDocks(DrawingHandleScreen handle, EntityUid uid, Matrix3x2 grid var position = state.Coordinates.Position; var uiPosition = Vector2.Transform(position, gridToView); - if (uiPosition.X < 0 || uiPosition.X > Width) - continue; - - if (uiPosition.Y < 0 || uiPosition.Y > Height) + if (!viewBounds.Contains(uiPosition)) continue; labeled.Add(state.LabelName);