Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spectator mode not showing when a spectated user quits correctly #25548

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Restore some virtual specs to appease Moq
  • Loading branch information
peppy committed Nov 23, 2023
commit 82b5dc213c4e0c7e171f031bc93959f538c5b7fb
6 changes: 3 additions & 3 deletions osu.Game/Online/Spectator/SpectatorClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract partial class SpectatorClient : Component, ISpectatorClient
/// <summary>
/// The states of all users currently being watched.
/// </summary>
public IBindableDictionary<int, SpectatorState> WatchedUserStates => watchedUserStates;
public virtual IBindableDictionary<int, SpectatorState> WatchedUserStates => watchedUserStates;

/// <summary>
/// A global list of all players currently playing.
Expand All @@ -53,7 +53,7 @@ public abstract partial class SpectatorClient : Component, ISpectatorClient
/// <summary>
/// Called whenever new frames arrive from the server.
/// </summary>
public event Action<int, FrameDataBundle>? OnNewFrames;
public virtual event Action<int, FrameDataBundle>? OnNewFrames;

/// <summary>
/// Called whenever a user starts a play session, or immediately if the user is being watched and currently in a play session.
Expand Down Expand Up @@ -249,7 +249,7 @@ public void EndPlaying(GameplayState state)
});
}

public void WatchUser(int userId)
public virtual void WatchUser(int userId)
{
Debug.Assert(ThreadSafety.IsUpdateThread);

Expand Down