Don't click-to-face when moving (#37874)
Looks bad doing it for a single tick.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user