1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Simplify pre-checks in HitObjectApplied delegate

This commit is contained in:
Dean Herbert 2023-10-25 13:53:20 +09:00
parent ded99c4097
commit 121fa6f165
No known key found for this signature in database

View File

@ -109,11 +109,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
private void onHitObjectApplied(DrawableHitObject? drawableObject = null) private void onHitObjectApplied(DrawableHitObject? drawableObject = null)
{ {
if (drawableObject != null && drawableObject is not DrawableSlider)
return;
ballAnimation.ClearFrames();
double frameDelay; double frameDelay;
if (drawableObject?.HitObject != null) if (drawableObject?.HitObject != null)
@ -127,6 +122,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
else else
frameDelay = LegacySkinExtensions.SIXTY_FRAME_TIME; frameDelay = LegacySkinExtensions.SIXTY_FRAME_TIME;
ballAnimation.ClearFrames();
foreach (var texture in ballTextures) foreach (var texture in ballTextures)
ballAnimation.AddFrame(texture, frameDelay); ballAnimation.AddFrame(texture, frameDelay);
} }