From 4e4aa44a026ba2992f193e77b2e4f5b463788c2e Mon Sep 17 00:00:00 2001 From: rrex971 <75212090+rrex971@users.noreply.github.com> Date: Mon, 8 Dec 2025 02:17:35 +0530 Subject: [PATCH] Override sprite update method to handle alpha values > 1 like stable. If alpha exceeds 1 during a sprite's alpha transform like in a FadeTo(), it will set it to 0 mimicking stable's behavior. --- osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs b/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs index e25c915d8b..69b49ba819 100644 --- a/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs +++ b/osu.Game/Storyboards/Drawables/DrawableStoryboardSprite.cs @@ -74,6 +74,13 @@ namespace osu.Game.Storyboards.Drawables public override bool IsPresent => !float.IsNaN(DrawPosition.X) && !float.IsNaN(DrawPosition.Y) && base.IsPresent; + // Match stable behavior with alpha values > 1 during interpolation (eg. overshoot easings like InOutElastic etc.) + protected override void Update() + { + base.Update(); + if (Alpha > 1) Alpha = 0; + } + [Resolved] private ISkinSource skin { get; set; } = null!;