1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:23:22 +08:00

Fix elapsed time being counted twice on first frame

This commit is contained in:
Dean Herbert 2023-12-27 00:11:22 +09:00
parent 225528d519
commit d70fddb6fd
No known key found for this signature in database

View File

@ -227,8 +227,10 @@ namespace osu.Game.Screens.Play
{ {
elapsedGameplayClockTime += GameplayClock.ElapsedFrameTime; elapsedGameplayClockTime += GameplayClock.ElapsedFrameTime;
elapsedValidationTime ??= elapsedGameplayClockTime; if (elapsedValidationTime == null)
elapsedValidationTime += GameplayClock.Rate * Time.Elapsed; elapsedValidationTime = elapsedGameplayClockTime;
else
elapsedValidationTime += GameplayClock.Rate * Time.Elapsed;
if (Math.Abs(elapsedGameplayClockTime - elapsedValidationTime!.Value) > 300) if (Math.Abs(elapsedGameplayClockTime - elapsedValidationTime!.Value) > 300)
{ {