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)
|
if (!_timing.IsFirstTimePredicted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var oldMoving = SharedMoverController.GetNormalizedMovement(args.OldMovement) != MoveButtons.None;
|
var oldMoving = (SharedMoverController.GetNormalizedMovement(args.OldMovement) & MoveButtons.AnyDirection) != MoveButtons.None;
|
||||||
var moving = SharedMoverController.GetNormalizedMovement(args.Component.HeldMoveButtons) != MoveButtons.None;
|
var moving = (SharedMoverController.GetNormalizedMovement(args.Component.HeldMoveButtons) & MoveButtons.AnyDirection) != MoveButtons.None;
|
||||||
|
|
||||||
if (oldMoving == moving || !_spriteQuery.TryGetComponent(uid, out var sprite))
|
if (oldMoving == moving || !_spriteQuery.TryGetComponent(uid, out var sprite))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -626,6 +626,7 @@ namespace Content.Shared.Movement.Systems
|
|||||||
Left = 4,
|
Left = 4,
|
||||||
Right = 8,
|
Right = 8,
|
||||||
Walk = 16,
|
Walk = 16,
|
||||||
|
AnyDirection = Up | Down | Left | Right,
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
|
|||||||
Reference in New Issue
Block a user