1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 15:17:27 +08:00

Merge pull request #28339 from bdach/fix-legacy-body-piece-animation-not-resetting-sometimes

Fix legacy mania note body animation not resetting sometimes
This commit is contained in:
Dan Balasescu 2024-05-29 18:04:39 +09:00 committed by GitHub
commit fa1da193ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,10 +140,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
private void onIsHittingChanged(ValueChangedEvent<bool> isHitting) private void onIsHittingChanged(ValueChangedEvent<bool> isHitting)
{ {
if (bodySprite is TextureAnimation bodyAnimation) if (bodySprite is TextureAnimation bodyAnimation)
{
bodyAnimation.GotoFrame(0);
bodyAnimation.IsPlaying = isHitting.NewValue; bodyAnimation.IsPlaying = isHitting.NewValue;
}
if (lightContainer == null) if (lightContainer == null)
return; return;
@ -219,6 +216,9 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
{ {
base.Update(); base.Update();
if (!isHitting.Value)
(bodySprite as TextureAnimation)?.GotoFrame(0);
if (holdNote.Body.HasHoldBreak) if (holdNote.Body.HasHoldBreak)
missFadeTime.Value = holdNote.Body.Result.TimeAbsolute; missFadeTime.Value = holdNote.Body.Result.TimeAbsolute;