From 26a794f4aa3b8f82e6a7ff8d76194c92b0da90b7 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sun, 27 Nov 2022 19:19:41 +1300 Subject: [PATCH] Fix in-range-unobstructed error (#12775) --- Content.Shared/Interaction/SharedInteractionSystem.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index f75e4f3973..568fd6af47 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -557,7 +557,8 @@ namespace Content.Shared.Interaction else { originPos = Transform(origin).MapPosition; - targetRot = Transform(Transform(other).ParentUid).LocalRotation + otherAngle; + var otherParent = Transform(other).ParentUid; + targetRot = otherParent.IsValid() ? Transform(otherParent).LocalRotation + otherAngle : otherAngle; } // Do a raycast to check if relevant