mirror of
https://github.com/ppy/osu
synced 2025-03-01 17:11:12 +00:00
Fix calculation of most common beat length for mania scroll speed
This commit is contained in:
parent
e333831c45
commit
a09563a7d9
@ -116,25 +116,11 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
|
|
||||||
if (RelativeScaleBeatLengths)
|
if (RelativeScaleBeatLengths)
|
||||||
{
|
{
|
||||||
IReadOnlyList<TimingControlPoint> timingPoints = Beatmap.ControlPointInfo.TimingPoints;
|
baseBeatLength = Beatmap.GetMostCommonBeatLength();
|
||||||
double maxDuration = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < timingPoints.Count; i++)
|
|
||||||
{
|
|
||||||
if (timingPoints[i].Time > lastObjectTime)
|
|
||||||
break;
|
|
||||||
|
|
||||||
double endTime = i < timingPoints.Count - 1 ? timingPoints[i + 1].Time : lastObjectTime;
|
|
||||||
double duration = endTime - timingPoints[i].Time;
|
|
||||||
|
|
||||||
if (duration > maxDuration)
|
|
||||||
{
|
|
||||||
maxDuration = duration;
|
|
||||||
// The slider multiplier is post-multiplied to determine the final velocity, but for relative scale beat lengths
|
// The slider multiplier is post-multiplied to determine the final velocity, but for relative scale beat lengths
|
||||||
// the multiplier should not affect the effective timing point (the longest in the beatmap), so it is factored out here
|
// the multiplier should not affect the effective timing point (the longest in the beatmap), so it is factored out here
|
||||||
baseBeatLength = timingPoints[i].BeatLength / Beatmap.Difficulty.SliderMultiplier;
|
baseBeatLength /= Beatmap.Difficulty.SliderMultiplier;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Merge sequences of timing and difficulty control points to create the aggregate "multiplier" control point
|
// Merge sequences of timing and difficulty control points to create the aggregate "multiplier" control point
|
||||||
|
Loading…
Reference in New Issue
Block a user