From fc8da53fba02d20b1b6d840a542bd8cdb224e537 Mon Sep 17 00:00:00 2001 From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Sun, 16 Jan 2022 12:21:08 -0800 Subject: [PATCH] Stops InteractionOutline when the mouse is off screen. (#6191) --- Content.Client/Outline/InteractionOutlineSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Client/Outline/InteractionOutlineSystem.cs b/Content.Client/Outline/InteractionOutlineSystem.cs index 5cf24f177c..08b511e45b 100644 --- a/Content.Client/Outline/InteractionOutlineSystem.cs +++ b/Content.Client/Outline/InteractionOutlineSystem.cs @@ -52,7 +52,8 @@ public sealed class InteractionOutlineSystem : EntitySystem EntityUid? entityToClick = null; var renderScale = 1; - if (_uiManager.CurrentlyHovered is IViewportControl vp) + if (_uiManager.CurrentlyHovered is IViewportControl vp + && _inputManager.MouseScreenPosition.IsValid) { var mousePosWorld = vp.ScreenToMap(_inputManager.MouseScreenPosition.Position); entityToClick = screen.GetEntityUnderPosition(mousePosWorld);