Fix time until next beat potentially being exactly zero at point of trigger

This commit is contained in:
Dean Herbert 2021-07-17 14:35:43 +09:00
parent 23ed77f2c6
commit 87d3bd4b93
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ protected override void Update()
beatIndex--;
TimeUntilNextBeat = (timingPoint.Time - currentTrackTime) % beatLength;
if (TimeUntilNextBeat < 0)
if (TimeUntilNextBeat <= 0)
TimeUntilNextBeat += beatLength;
TimeSinceLastBeat = beatLength - TimeUntilNextBeat;