mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 19:32:55 +08: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()
|
public double GetMostCommonBeatLength()
|
||||||
{
|
{
|
||||||
if (!HitObjects.Any())
|
double lastTime;
|
||||||
return ControlPointInfo.TimingPoints.LastOrDefault()?.Time ?? 0;
|
|
||||||
|
|
||||||
// The last playable time in the beatmap - the last timing point extends to this time.
|
// 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.
|
// 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 =
|
var mostCommon =
|
||||||
// Construct a set of (beatLength, duration) tuples for each individual timing point.
|
// Construct a set of (beatLength, duration) tuples for each individual timing point.
|
||||||
|
@ -114,7 +114,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
double lastObjectTime = Beatmap.HitObjects.Any() ? Beatmap.GetLastObjectTime() : 0;
|
double lastObjectTime = Beatmap.HitObjects.Any() ? Beatmap.GetLastObjectTime() : double.MaxValue;
|
||||||
double baseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
double baseBeatLength = TimingControlPoint.DEFAULT_BEAT_LENGTH;
|
||||||
|
|
||||||
if (RelativeScaleBeatLengths)
|
if (RelativeScaleBeatLengths)
|
||||||
|
Loading…
Reference in New Issue
Block a user