mirror of
https://github.com/ppy/osu
synced 2025-01-02 04:12:13 +00:00
Fix two implementation oversights
This commit is contained in:
parent
d8dd7e7e0f
commit
809d02cda0
@ -81,12 +81,14 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
public double GetMostCommonBeatLength()
|
||||
{
|
||||
if (!HitObjects.Any())
|
||||
return ControlPointInfo.TimingPoints.LastOrDefault()?.Time ?? 0;
|
||||
double lastTime;
|
||||
|
||||
// The last playable time in the beatmap - the last timing point extends to this time.
|
||||
// Note: This is more accurate and may present different results because osu-stable didn't have the ability to calculate slider durations in this context.
|
||||
double lastTime = this.GetLastObjectTime();
|
||||
if (!HitObjects.Any())
|
||||
lastTime = ControlPointInfo.TimingPoints.LastOrDefault()?.Time ?? 0;
|
||||
else
|
||||
lastTime = this.GetLastObjectTime();
|
||||
|
||||
var mostCommon =
|
||||
// Construct a set of (beatLength, duration) tuples for each individual timing point.
|
||||
|
@ -114,7 +114,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
break;
|
||||
}
|
||||
|
||||
double lastObjectTime = Beatmap.HitObjects.Any() ? Beatmap.GetLastObjectTime() : 0;
|
||||
double lastObjectTime = Beatmap.HitObjects.Any() ? Beatmap.GetLastObjectTime() : double.MaxValue;
|
||||
double baseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||
|
||||
if (RelativeScaleBeatLengths)
|
||||
|
Loading…
Reference in New Issue
Block a user