Holding the walk button no longer activates sprite movement state (#24455)

* Dancing is forbidden

* Suggested changes

(cherry picked from commit c1fd42202f35dcddbf2dc6215fcf462bf31e5ce3)
This commit is contained in:
Tayrtahn 2024-01-23 20:26:45 -05:00 committed by Debug
parent 2a6cefec3c
commit 4d5b3ba435
No known key found for this signature in database
GPG Key ID: 271270A74EF9C350
2 changed files with 3 additions and 2 deletions

View File

@ -27,8 +27,8 @@ public sealed class SpriteMovementSystem : EntitySystem
if (!_timing.IsFirstTimePredicted)
return;
var oldMoving = SharedMoverController.GetNormalizedMovement(args.OldMovement) != MoveButtons.None;
var moving = SharedMoverController.GetNormalizedMovement(args.Component.HeldMoveButtons) != MoveButtons.None;
var oldMoving = (SharedMoverController.GetNormalizedMovement(args.OldMovement) & MoveButtons.AnyDirection) != MoveButtons.None;
var moving = (SharedMoverController.GetNormalizedMovement(args.Component.HeldMoveButtons) & MoveButtons.AnyDirection) != MoveButtons.None;
if (oldMoving == moving || !_spriteQuery.TryGetComponent(uid, out var sprite))
return;

View File

@ -626,6 +626,7 @@ namespace Content.Shared.Movement.Systems
Left = 4,
Right = 8,
Walk = 16,
AnyDirection = Up | Down | Left | Right,
}
[Flags]