]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Don't click-to-face when moving (#37874)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Tue, 27 May 2025 11:34:23 +0000 (21:34 +1000)
committerGitHub <noreply@github.com>
Tue, 27 May 2025 11:34:23 +0000 (13:34 +0200)
Looks bad doing it for a single tick.

Content.Shared/Interaction/SharedInteractionSystem.cs

index 230fbda8d3a47981bd6e0877829314dca0c45927..5f063a9070b20f868775729ce8d9bc7367311e7b 100644 (file)
@@ -17,6 +17,7 @@ using Content.Shared.Inventory.Events;
 using Content.Shared.Item;
 using Content.Shared.Movement.Components;
 using Content.Shared.Movement.Pulling.Systems;
+using Content.Shared.Movement.Systems;
 using Content.Shared.Physics;
 using Content.Shared.Players.RateLimiting;
 using Content.Shared.Popups;
@@ -567,8 +568,11 @@ namespace Content.Shared.Interaction
             if (_transform.GetMapId(coordinates) != Transform(user).MapID)
                 return false;
 
-            if (!HasComp<NoRotateOnInteractComponent>(user))
+            // Only rotate to face if they're not moving.
+            if (!HasComp<NoRotateOnInteractComponent>(user) && (!TryComp(user, out InputMoverComponent? mover) || (mover.HeldMoveButtons & MoveButtons.AnyDirection) == 0x0))
+            {
                 _rotateToFaceSystem.TryFaceCoordinates(user, _transform.ToMapCoordinates(coordinates).Position);
+            }
 
             return true;
         }