1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Move logic to Update instead

This commit is contained in:
Dean Herbert 2023-05-03 15:18:37 +09:00
parent 4013cdcfa8
commit 6a59ded1ba

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,15 +325,6 @@ 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)
{
// Except for the IsHitting state, as this handles animations that need to be reapplied
// after rewind.
isHitting.Value = false;
return;
}
// Make sure a hold was started
if (HoldStartTime == null)
return;