mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Fix potential failure when slider has no ticks
This commit is contained in:
parent
63843c79c3
commit
5ffc25c8e8
@ -228,7 +228,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
||||
double trackingEndTime = Math.Max(Math.Max(
|
||||
slider.StartTime + slider.Duration + SliderEventGenerator.TAIL_LENIENCY,
|
||||
slider.StartTime + slider.Duration / 2
|
||||
), slider.NestedHitObjects.OfType<SliderTick>().Last().StartTime);
|
||||
), slider.NestedHitObjects.OfType<SliderTick>().LastOrDefault()?.StartTime ?? double.MinValue);
|
||||
|
||||
slider.LazyTravelTime = trackingEndTime - slider.StartTime;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user