1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 08:23:20 +08:00

Merge pull request #22866 from peppy/mania-fix-hold-note-rewind

Fix osu!mania hold note animations not correctly re-applying after rewind
This commit is contained in:
Bartłomiej Dach 2023-05-08 21:29:55 +02:00 committed by GitHub
commit 2687eac34d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,6 +219,9 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (Time.Current < releaseTime)
releaseTime = null;
if (Time.Current < HoldStartTime)
endHold();
// Pad the full size container so its contents (i.e. the masking container) reach under the tail.
// This is required for the tail to not be masked away, since it lies outside the bounds of the hold note.
sizingContainer.Padding = new MarginPadding
@ -322,14 +325,14 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
if (e.Action != Action.Value)
return;
// do not run any of this logic when rewinding, as it inverts order of presses/releases.
if (Time.Elapsed < 0)
return;
// Make sure a hold was started
if (HoldStartTime == null)
return;
// do not run any of this logic when rewinding, as it inverts order of presses/releases.
if (Time.Elapsed < 0)
return;
Tail.UpdateResult();
endHold();