Skip to content

Commit

Permalink
Fix docks disappearing in NAV when >100% UI scale (#2898)
Browse files Browse the repository at this point in the history
* Fix docks disappearing in NAV when >100% UI scale

The occlusion bounds in the dock drawing code didn't take into account
UI scale, so docks passed a certain point would disappear.

Fixes #2775

* Update Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs

---------

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
  • Loading branch information
ColonelThirtyTwo and whatston3 authored Feb 11, 2025
1 parent 8f643a4 commit a8dcbb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ private void DrawDocks(DrawingHandleScreen handle, EntityUid uid, Matrix3x2 grid
const float sqrt2 = 1.41421356f;
const float dockRadius = DockScale * sqrt2;
// Worst-case bounds used to cull a dock:
Box2 viewBounds = new Box2(-dockRadius, -dockRadius, Size.X + dockRadius, Size.Y + dockRadius);
Box2 viewBounds = new Box2(-dockRadius, -dockRadius, PixelSize.X + dockRadius, PixelSize.Y + dockRadius); // Frontier: Size<PixelSize
if (_docks.TryGetValue(nent, out var docks))
{
foreach (var state in docks)
Expand Down

0 comments on commit a8dcbb4

Please sign in to comment.