mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Add better defaults for ControlPoint.
This commit is contained in:
@ -10,8 +10,8 @@ namespace osu.Game.Beatmaps.Timing
|
||||
{
|
||||
public readonly List<ControlPoint> ControlPoints = new List<ControlPoint>();
|
||||
|
||||
public double BPMMaximum => 60000 / (ControlPoints?.Where(c => c.BeatLength != 0).OrderBy(c => c.BeatLength).FirstOrDefault() ?? ControlPoint.Default).BeatLength;
|
||||
public double BPMMinimum => 60000 / (ControlPoints?.Where(c => c.BeatLength != 0).OrderByDescending(c => c.BeatLength).FirstOrDefault() ?? ControlPoint.Default).BeatLength;
|
||||
public double BPMMaximum => 60000 / (ControlPoints?.Where(c => c.BeatLength != 0).OrderBy(c => c.BeatLength).FirstOrDefault() ?? new ControlPoint()).BeatLength;
|
||||
public double BPMMinimum => 60000 / (ControlPoints?.Where(c => c.BeatLength != 0).OrderByDescending(c => c.BeatLength).FirstOrDefault() ?? new ControlPoint()).BeatLength;
|
||||
public double BPMMode => BPMAt(ControlPoints.Where(c => c.BeatLength != 0).GroupBy(c => c.BeatLength).OrderByDescending(grp => grp.Count()).First().First().Time);
|
||||
|
||||
public double BPMAt(double time)
|
||||
@ -74,7 +74,7 @@ namespace osu.Game.Beatmaps.Timing
|
||||
else break;
|
||||
}
|
||||
|
||||
return timingPoint ?? ControlPoint.Default;
|
||||
return timingPoint ?? new ControlPoint();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user