1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Amend diffcalc to use something closer to the original calculation for now

This commit is contained in:
Dean Herbert 2023-10-11 21:12:04 +09:00
parent 658b6a166f
commit 63843c79c3
No known key found for this signature in database

View File

@ -215,13 +215,20 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
if (slider.LazyEndPosition != null)
return;
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
);
// This commented version is actually correct by the new lazer implementation, but intentionally held back from
// difficulty calculator to preserve known behaviour.
// 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.Duration + 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
// );
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.LazyTravelTime = trackingEndTime - slider.StartTime;