Don't click-to-face when moving (#37874)

Looks bad doing it for a single tick.
This commit is contained in:
metalgearsloth 2025-05-27 21:34:23 +10:00 committed by Quanteey
parent eb94fb8e8d
commit e365dc9cb7
1 changed files with 5 additions and 1 deletions

View 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;
@ -568,8 +569,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;
}