Fix osu!mania hold note animations not correctly re-applying after rewind

There's early exit logic in `OnPressed`/`OnReleased` for the sake of
keeping order correct, but this doesn't account for the fact that
`DrawableHitObject` resets all animations when the hit state changes.

A bit of an ugly workaround, but seems to work as expected.
This commit is contained in:
Dean Herbert 2023-03-14 18:15:18 +09:00
parent 20b2d0d4c7
commit 5aebbac6c5
1 changed files with 5 additions and 0 deletions

View File

@ -323,7 +323,12 @@ public void OnReleased(KeyBindingReleaseEvent<ManiaAction> e)
// do not run any of this logic when rewinding, as it inverts order of presses/releases. // do not run any of this logic when rewinding, as it inverts order of presses/releases.
if (Time.Elapsed < 0) if (Time.Elapsed < 0)
{
// Except for the IsHitting state, as this handles animations that need to be reapplied
// after rewind.
isHitting.Value = false;
return; return;
}
// Make sure a hold was started // Make sure a hold was started
if (HoldStartTime == null) if (HoldStartTime == null)