mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Merge pull request #366 from OussamaDanba/slider_timingpoint_fix
Fix beatmap import crash when the first timingPoint starts later than…
This commit is contained in:
commit
6a58d7ab2a
@ -39,6 +39,7 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
ControlPoint timingPoint = null;
|
||||
foreach (var controlPoint in ControlPoints)
|
||||
{
|
||||
if (controlPoint.Time <= time)
|
||||
{
|
||||
if (controlPoint.TimingChange)
|
||||
@ -48,7 +49,17 @@ namespace osu.Game.Beatmaps
|
||||
}
|
||||
else overridePoint = controlPoint;
|
||||
}
|
||||
else break;
|
||||
// Some beatmaps have the first timingPoint (accidentally) start after the first HitObject(s).
|
||||
// This branch makes it so that the first ControlPoint that makes a timing change is used as the timingPoint for the HitObject(s).
|
||||
else if (timingPoint == null && controlPoint.TimingChange)
|
||||
{
|
||||
timingPoint = controlPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return timingPoint;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user