From fb705702fbf98e23b7bd6ee2becf9568fc0a1971 Mon Sep 17 00:00:00 2001 From: Southbridge <7013162+southbridge-fur@users.noreply.github.com> Date: Sat, 28 Dec 2024 00:48:26 -0500 Subject: [PATCH] PlacementManager CurrentEraserMouseCoordinates fix (#5576) --- Robust.Client/Placement/PlacementManager.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Robust.Client/Placement/PlacementManager.cs b/Robust.Client/Placement/PlacementManager.cs index 04e412c1c0..f48ccda658 100644 --- a/Robust.Client/Placement/PlacementManager.cs +++ b/Robust.Client/Placement/PlacementManager.cs @@ -536,13 +536,14 @@ namespace Robust.Client.Placement } else { + var mousePosition = EyeManager.PixelToMap(InputManager.MouseScreenPosition); var map = EntityManager.GetComponent(ent).MapID; - if (map == MapId.Nullspace || !Eraser) + if (map == MapId.Nullspace || !Eraser || mousePosition.MapId == MapId.Nullspace) { coordinates = new EntityCoordinates(); return false; } - coordinates = XformSystem.ToCoordinates(ent, EyeManager.PixelToMap(InputManager.MouseScreenPosition)); + coordinates = XformSystem.ToCoordinates(mousePosition); return true; } }