This commit is contained in:
Dean Herbert 2019-10-26 11:20:07 +09:00
parent 7502b64541
commit 8ccff0e9cf
2 changed files with 7 additions and 7 deletions

View File

@ -167,9 +167,9 @@ namespace osu.Game.Tests.Beatmaps.Formats
var controlPoints = beatmap.ControlPointInfo; var controlPoints = beatmap.ControlPointInfo;
Assert.AreEqual(4, controlPoints.TimingPoints.Count); Assert.AreEqual(4, controlPoints.TimingPoints.Count);
Assert.AreEqual(5, controlPoints.DifficultyPoints.Count); Assert.AreEqual(6, controlPoints.DifficultyPoints.Count);
Assert.AreEqual(34, controlPoints.SamplePoints.Count); Assert.AreEqual(34, controlPoints.SamplePoints.Count);
Assert.AreEqual(8, controlPoints.EffectPoints.Count); Assert.AreEqual(9, controlPoints.EffectPoints.Count);
var timingPoint = controlPoints.TimingPointAt(0); var timingPoint = controlPoints.TimingPointAt(0);
Assert.AreEqual(956, timingPoint.Time); Assert.AreEqual(956, timingPoint.Time);
@ -191,7 +191,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier); Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
difficultyPoint = controlPoints.DifficultyPointAt(48428); difficultyPoint = controlPoints.DifficultyPointAt(48428);
Assert.AreEqual(0, difficultyPoint.Time); Assert.AreEqual(956, difficultyPoint.Time);
Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier); Assert.AreEqual(1.0, difficultyPoint.SpeedMultiplier);
difficultyPoint = controlPoints.DifficultyPointAt(116999); difficultyPoint = controlPoints.DifficultyPointAt(116999);

View File

@ -95,13 +95,13 @@ namespace osu.Game.Beatmaps.ControlPoints
{ {
switch (referencePoint) switch (referencePoint)
{ {
case TimingControlPoint _: return TimingPointAt(time); case TimingControlPoint _: return binarySearch(TimingPoints, time);
case EffectControlPoint _: return EffectPointAt(time); case EffectControlPoint _: return binarySearch(EffectPoints, time);
case SampleControlPoint _: return SamplePointAt(time); case SampleControlPoint _: return binarySearch(SamplePoints, time);
case DifficultyControlPoint _: return DifficultyPointAt(time); case DifficultyControlPoint _: return binarySearch(DifficultyPoints, time);
} }
return null; return null;