mirror of https://github.com/ppy/osu
Fix taiko leaving behind empty judgements on legacy skins
This commit is contained in:
parent
b241749119
commit
06e42b4b4c
|
@ -35,7 +35,7 @@ public override Drawable GetDrawableComponent(ISkinComponent component)
|
||||||
{
|
{
|
||||||
// if a taiko skin is providing explosion sprites, hide the judgements completely
|
// if a taiko skin is providing explosion sprites, hide the judgements completely
|
||||||
if (hasExplosion.Value)
|
if (hasExplosion.Value)
|
||||||
return Drawable.Empty();
|
return Drawable.Empty().With(d => d.LifetimeEnd = double.MinValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(component is TaikoSkinComponent taikoComponent))
|
if (!(component is TaikoSkinComponent taikoComponent))
|
||||||
|
|
|
@ -150,17 +150,13 @@ private void runAnimation()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JudgementBody.Drawable is IAnimatableJudgement animatable)
|
if (JudgementBody.Drawable is IAnimatableJudgement animatable)
|
||||||
{
|
|
||||||
var drawableAnimation = (Drawable)animatable;
|
|
||||||
|
|
||||||
animatable.PlayAnimation();
|
animatable.PlayAnimation();
|
||||||
|
|
||||||
// a derived version of DrawableJudgement may be proposing a lifetime.
|
// a derived version of DrawableJudgement may be proposing a lifetime.
|
||||||
// if not adjusted (or the skinned portion requires greater bounds than calculated) use the skinned source's lifetime.
|
// if not adjusted (or the skinned portion requires greater bounds than calculated) use the skinned source's lifetime.
|
||||||
double lastTransformTime = drawableAnimation.LatestTransformEndTime;
|
double lastTransformTime = JudgementBody.Drawable.LatestTransformEndTime;
|
||||||
if (LifetimeEnd == double.MaxValue || lastTransformTime > LifetimeEnd)
|
if (LifetimeEnd == double.MaxValue || lastTransformTime > LifetimeEnd)
|
||||||
LifetimeEnd = lastTransformTime;
|
LifetimeEnd = lastTransformTime;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue