Skip to content

Commit

Permalink
Merge pull request #27504 from peppy/replay-state-sanity-1
Browse files Browse the repository at this point in the history
Never set `waitingOnFrames` if a replay is not attached
  • Loading branch information
bdach committed Mar 6, 2024
2 parents 0d4515d + 65ce4ca commit b740481
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion osu.Game/Rulesets/UI/FrameStabilityContainer.cs
Expand Up @@ -189,7 +189,7 @@ private void updateClock()
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;
Expand Down
13 changes: 11 additions & 2 deletions osu.Game/Screens/Play/GameplayClockContainer.cs
Expand Up @@ -122,8 +122,17 @@ public void Stop()
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.
Expand Down

0 comments on commit b740481

Please sign in to comment.