Holding the walk button no longer activates sprite movement state (#24455)
* Dancing is forbidden * Suggested changes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -626,6 +626,7 @@ namespace Content.Shared.Movement.Systems
|
||||
Left = 4,
|
||||
Right = 8,
|
||||
Walk = 16,
|
||||
AnyDirection = Up | Down | Left | Right,
|
||||
}
|
||||
|
||||
[Flags]
|
||||
|
||||
Reference in New Issue
Block a user