diff --git a/Content.Client/_White/Animations/FlipOnHitSystem.cs b/Content.Client/_White/Animations/FlipOnHitSystem.cs index da5dd4cb18..d501bd75fe 100644 --- a/Content.Client/_White/Animations/FlipOnHitSystem.cs +++ b/Content.Client/_White/Animations/FlipOnHitSystem.cs @@ -51,7 +51,7 @@ protected override void PlayAnimation(EntityUid user) var animation = new Animation { - Length = TimeSpan.FromMilliseconds(1600), + Length = TimeSpan.FromMilliseconds(400), AnimationTracks = { new AnimationTrackComponentProperty @@ -64,12 +64,6 @@ protected override void PlayAnimation(EntityUid user) new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees - 10), 0f), new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 180), 0.2f), new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 360), 0.2f), - new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 540), 0.2f), - new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 720), 0.2f), - new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 900), 0.2f), - new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 1080), 0.2f), - new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 1260), 0.2f), - new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees + 1440), 0.2f), new AnimationTrackProperty.KeyFrame(Angle.FromDegrees(degrees), 0f) } } diff --git a/Content.Shared/_White/Animations/SharedFlipOnHitSystem.cs b/Content.Shared/_White/Animations/SharedFlipOnHitSystem.cs index 8bae40233e..e461e88877 100644 --- a/Content.Shared/_White/Animations/SharedFlipOnHitSystem.cs +++ b/Content.Shared/_White/Animations/SharedFlipOnHitSystem.cs @@ -1,4 +1,5 @@ using Content.Shared.Item.ItemToggle.Components; +using Content.Shared.Standing; using Content.Shared.Weapons.Melee.Events; using Robust.Shared.Serialization; using Robust.Shared.Timing; @@ -8,6 +9,7 @@ namespace Content.Shared._White.Animations; public abstract class SharedFlipOnHitSystem : EntitySystem { [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly StandingStateSystem _standingState = default!; public override void Initialize() { @@ -27,6 +29,9 @@ private void OnHit(Entity ent, ref MeleeHitEvent args) if (TryComp(ent, out ItemToggleComponent? itemToggle) && !itemToggle.Activated) return; + if (_standingState.IsDown(args.User)) + return; + PlayAnimation(args.User); }