mirror of
https://github.com/ppy/osu.git
synced 2025-03-03 20:43:22 +08:00
Fix hit lighting dictating lifetime even when not present in skin
This commit is contained in:
parent
9d0a6de26e
commit
9d3de5bca0
@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
bool hitLightingEnabled = config.Get<bool>(OsuSetting.HitLighting);
|
bool hitLightingEnabled = config.Get<bool>(OsuSetting.HitLighting);
|
||||||
|
|
||||||
if (hitLightingEnabled)
|
if (hitLightingEnabled && Lighting.Drawable != null)
|
||||||
{
|
{
|
||||||
Lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
|
Lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
|
||||||
Lighting.FadeIn(200).Then().Delay(200).FadeOut(1000);
|
Lighting.FadeIn(200).Then().Delay(200).FadeOut(1000);
|
||||||
|
@ -139,12 +139,14 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
|
|
||||||
animatable.PlayAnimation();
|
animatable.PlayAnimation();
|
||||||
|
|
||||||
drawableAnimation.Expire(true);
|
|
||||||
|
|
||||||
// a derived version of DrawableJudgement may be adjusting lifetime.
|
// a derived version of DrawableJudgement may be adjusting 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.
|
||||||
if (LifetimeEnd == double.MaxValue || drawableAnimation.LifetimeEnd > LifetimeEnd)
|
double lastTransformTime = drawableAnimation.LatestTransformEndTime;
|
||||||
LifetimeEnd = drawableAnimation.LifetimeEnd;
|
|
||||||
|
if (LifetimeEnd == double.MaxValue || lastTransformTime > LifetimeEnd)
|
||||||
|
{
|
||||||
|
LifetimeEnd = lastTransformTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user