mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 00:37:20 +08:00
Early return if beatLength = 0.
This commit is contained in:
parent
95c4704a9e
commit
de575b3867
@ -25,8 +25,11 @@ namespace osu.Game.Graphics.Containers
|
||||
ControlPoint overridePoint;
|
||||
ControlPoint controlPoint = beatmap.Value.Beatmap.TimingInfo.TimingPointAt(currentTrackTime, out overridePoint);
|
||||
|
||||
if (controlPoint.BeatLength == 0)
|
||||
return;
|
||||
|
||||
bool kiai = (overridePoint ?? controlPoint).KiaiMode;
|
||||
int beat = controlPoint.BeatLength > 0 ? (int)((currentTrackTime - controlPoint.Time) / controlPoint.BeatLength) : 0;
|
||||
int beat = (int)((currentTrackTime - controlPoint.Time) / controlPoint.BeatLength);
|
||||
|
||||
// The beats before the start of the first control point are off by 1, this should do the trick
|
||||
if (currentTrackTime < controlPoint.Time)
|
||||
|
Loading…
x
Reference in New Issue
Block a user