mirror of
https://github.com/ppy/osu
synced 2025-01-04 13:22:08 +00:00
Fix nullability and remove extra preempt from SliderEndCircle
calculation
This commit is contained in:
parent
1a04be15c7
commit
a619812cab
@ -88,13 +88,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
protected override void UpdateInitialTransforms()
|
protected override void UpdateInitialTransforms()
|
||||||
{
|
{
|
||||||
// When snaking in is enabled, the first end circle needs to be delayed until the snaking completes.
|
// When snaking in is enabled, the first end circle needs to be delayed until the snaking completes.
|
||||||
bool delayFadeIn = DrawableSlider.SliderBody!.SnakingIn.Value && HitObject.RepeatIndex == 0;
|
bool delayFadeIn = DrawableSlider.SliderBody?.SnakingIn.Value == true && HitObject.RepeatIndex == 0;
|
||||||
|
|
||||||
animDuration = Math.Min(300, HitObject.SpanDuration);
|
animDuration = Math.Min(300, HitObject.SpanDuration);
|
||||||
|
|
||||||
this
|
this
|
||||||
.FadeOut()
|
.FadeOut()
|
||||||
.Delay(delayFadeIn ? Slider!.TimePreempt / 3f : 0)
|
.Delay(delayFadeIn ? (Slider?.TimePreempt ?? 0) / 3 : 0)
|
||||||
.FadeIn(HitObject.RepeatIndex == 0 ? HitObject.TimeFadeIn : animDuration);
|
.FadeIn(HitObject.RepeatIndex == 0 ? HitObject.TimeFadeIn : animDuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,11 +92,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
base.UpdateInitialTransforms();
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
// When snaking in is enabled, the first end circle needs to be delayed until the snaking completes.
|
// When snaking in is enabled, the first end circle needs to be delayed until the snaking completes.
|
||||||
bool delayFadeIn = DrawableSlider.SliderBody!.SnakingIn.Value && HitObject.RepeatIndex == 0;
|
bool delayFadeIn = DrawableSlider.SliderBody?.SnakingIn.Value == true && HitObject.RepeatIndex == 0;
|
||||||
|
|
||||||
CirclePiece
|
CirclePiece
|
||||||
.FadeOut()
|
.FadeOut()
|
||||||
.Delay(delayFadeIn ? Slider!.TimePreempt / 3f : 0)
|
.Delay(delayFadeIn ? (Slider?.TimePreempt ?? 0) / 3 : 0)
|
||||||
.FadeIn(HitObject.TimeFadeIn);
|
.FadeIn(HitObject.TimeFadeIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Rulesets.Osu.Objects
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// The first end circle should fade in with the slider.
|
// The first end circle should fade in with the slider.
|
||||||
TimePreempt = (StartTime - slider.StartTime) + slider.TimePreempt;
|
TimePreempt += StartTime - slider.StartTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user