1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Merge pull request #27504 from peppy/replay-state-sanity-1

Never set `waitingOnFrames` if a replay is not attached
This commit is contained in:
Bartłomiej Dach 2024-03-06 09:51:09 +01:00 committed by GitHub
commit b740481eaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View File

@ -189,7 +189,7 @@ namespace osu.Game.Rulesets.UI
double timeBehind = Math.Abs(proposedTime - referenceClock.CurrentTime);
isCatchingUp.Value = timeBehind > 200;
waitingOnFrames.Value = state == PlaybackState.NotValid;
waitingOnFrames.Value = hasReplayAttached && state == PlaybackState.NotValid;
manualClock.CurrentTime = proposedTime;
manualClock.Rate = Math.Abs(referenceClock.Rate) * direction;

View File

@ -122,8 +122,17 @@ namespace osu.Game.Screens.Play
StopGameplayClock();
}
protected virtual void StartGameplayClock() => GameplayClock.Start();
protected virtual void StopGameplayClock() => GameplayClock.Stop();
protected virtual void StartGameplayClock()
{
Logger.Log($"{nameof(GameplayClockContainer)} started via call to {nameof(StartGameplayClock)}");
GameplayClock.Start();
}
protected virtual void StopGameplayClock()
{
Logger.Log($"{nameof(GameplayClockContainer)} stopped via call to {nameof(StopGameplayClock)}");
GameplayClock.Stop();
}
/// <summary>
/// Resets this <see cref="GameplayClockContainer"/> and the source to an initial state ready for gameplay.