Fix in-range-unobstructed error (#12775)

This commit is contained in:
Leon Friedrich
2022-11-27 19:19:41 +13:00
committed by GitHub
parent 63328db906
commit 26a794f4aa

View File

@@ -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