mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:52:55 +08:00
Fix difficulty calculation not correct handling slider leniency anymore
This commit is contained in:
parent
69ae370e82
commit
8d91991214
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using osu.Game.Rulesets.Difficulty.Preprocessing;
|
using osu.Game.Rulesets.Difficulty.Preprocessing;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
@ -214,7 +215,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
|
|||||||
if (slider.LazyEndPosition != null)
|
if (slider.LazyEndPosition != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
slider.LazyTravelTime = slider.NestedHitObjects[^1].StartTime + SliderEventGenerator.TAIL_LENIENCY - slider.StartTime;
|
double trackingEndTime = Math.Max(
|
||||||
|
// SliderTailCircle always occurs at the final end time of the slider, but the player only needs to hold until within a lenience before it.
|
||||||
|
slider.NestedHitObjects.OfType<SliderTailCircle>().Single().StartTime + SliderEventGenerator.TAIL_LENIENCY,
|
||||||
|
// There's an edge case where one or more ticks/repeats fall within that leniency range.
|
||||||
|
// In such a case, the player needs to track until the final tick or repeat.
|
||||||
|
slider.NestedHitObjects.LastOrDefault(n => n is not SliderTailCircle)?.StartTime ?? double.MinValue
|
||||||
|
);
|
||||||
|
|
||||||
|
slider.LazyTravelTime = trackingEndTime - slider.StartTime;
|
||||||
|
|
||||||
double endTimeMin = slider.LazyTravelTime / slider.SpanDuration;
|
double endTimeMin = slider.LazyTravelTime / slider.SpanDuration;
|
||||||
if (endTimeMin % 2 >= 1)
|
if (endTimeMin % 2 >= 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user