Add clarification comment about explicit ProcessFrame() call

This commit is contained in:
Bartłomiej Dach 2021-12-27 21:13:04 +01:00
parent 9f8ad9f833
commit 568cab6808
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -57,6 +57,9 @@ namespace osu.Game.Graphics.Backgrounds
// `MusicController` will sometimes reload the track, even when the working beatmap technically hasn't changed.
// ensure that the storyboard's clock is always using the latest track instance.
storyboardClock.ChangeSource(newBeatmap.Track);
// more often than not, the previous source track's time will be in the future relative to the new source track.
// explicitly process a single frame so that `InterpolatingFramedClock`'s interpolation logic is bypassed
// and the storyboard clock is correctly rewound to the source track's time exactly.
storyboardClock.ProcessFrame();
}