mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Ensure elapsed time is always non-zero when advancing SpectatorPlayerClock
This commit is contained in:
@ -77,7 +77,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
|
||||
{
|
||||
if (IsRunning)
|
||||
{
|
||||
double elapsedSource = masterClock.ElapsedFrameTime;
|
||||
// When in catch-up mode, the source is usually not running.
|
||||
// In such a case, its elapsed time may be zero, which would cause catch-up to get stuck.
|
||||
// To avoid this, use a constant 16ms elapsed time for now. Probably not too correct, but this whole logic isn't too correct anyway.
|
||||
double elapsedSource = masterClock.ElapsedFrameTime != 0 ? masterClock.ElapsedFrameTime : 16;
|
||||
double elapsed = elapsedSource * Rate;
|
||||
|
||||
CurrentTime += elapsed;
|
||||
|
Reference in New Issue
Block a user