1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 15:22:55 +08:00

Fix adding null hit explosions

This commit is contained in:
smoogipoo 2020-04-02 15:27:31 +09:00
parent fa3a449c3b
commit de7ee57100

View File

@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
float explosionScale = GetManiaSkinConfig<float>(skin, LegacyManiaSkinConfigurationLookups.ExplosionScale)?.Value float explosionScale = GetManiaSkinConfig<float>(skin, LegacyManiaSkinConfigurationLookups.ExplosionScale)?.Value
?? 1; ?? 1;
InternalChild = explosion = skin.GetAnimation(imageName, true, false, startAtCurrentTime: true).With(d => explosion = skin.GetAnimation(imageName, true, false, startAtCurrentTime: true).With(d =>
{ {
if (d == null) if (d == null)
return; return;
@ -48,6 +48,9 @@ namespace osu.Game.Rulesets.Mania.Skinning
texAnimation.DefaultFrameLength = Math.Max(texAnimation.DefaultFrameLength, 170.0 / texAnimation.FrameCount); texAnimation.DefaultFrameLength = Math.Max(texAnimation.DefaultFrameLength, 170.0 / texAnimation.FrameCount);
}); });
if (explosion != null)
InternalChild = explosion;
direction.BindTo(scrollingInfo.Direction); direction.BindTo(scrollingInfo.Direction);
direction.BindValueChanged(onDirectionChanged, true); direction.BindValueChanged(onDirectionChanged, true);
} }