mirror of https://github.com/ppy/osu
Fix two implementation oversights
This commit is contained in:
parent
d8dd7e7e0f
commit
809d02cda0
|
@ -81,12 +81,14 @@ public Beatmap()
|
|||
|
||||
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 @@ private void load()
|
|||
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