Merge pull request #22047 from Feodor0090/wcd-length-fix

Fix `WaveformComparisonDisplay` does not take into account start time of control points
This commit is contained in:
Bartłomiej Dach 2023-01-08 20:36:35 +01:00 committed by GitHub
commit 2803c98612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ protected override bool OnMouseMove(MouseMoveEvent e)
if (!displayLocked.Value)
{
float trackLength = (float)beatmap.Value.Track.Length;
int totalBeatsAvailable = (int)(trackLength / timingPoint.BeatLength);
int totalBeatsAvailable = (int)((trackLength - timingPoint.Time) / timingPoint.BeatLength);
Scheduler.AddOnce(showFromBeat, (int)(e.MousePosition.X / DrawWidth * totalBeatsAvailable));
}