Skip to content

Commit 41af03d

Browse files
authored
Merge pull request #19597 from frenzibyte/hotfix-multi-spectator-results-screen
Fix multi-spectator potentially getting stuck for passed players (hotfix)
2 parents efc4a12 + 789e8b4 commit 41af03d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

osu.Game.Tests/Visual/Multiplayer/TestSceneMultiSpectatorScreen.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@ private void end(int userId)
432432
{
433433
var user = playingUsers.Single(u => u.UserID == userId);
434434

435-
OnlinePlayDependencies.MultiplayerClient.RemoveUser(user.User.AsNonNull());
436435
SpectatorClient.SendEndPlay(userId);
436+
OnlinePlayDependencies.MultiplayerClient.RemoveUser(user.User.AsNonNull());
437437

438438
playingUsers.Remove(user);
439439
});

osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/MultiSpectatorScreen.cs

+6
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ protected override void EndGameplay(int userId, SpectatorState state)
231231
if (state.State == SpectatedUserState.Passed || state.State == SpectatedUserState.Failed)
232232
return;
233233

234+
// we could also potentially receive EndGameplay with "Playing" state, at which point we can only early-return and hope it's a passing player.
235+
// todo: this shouldn't exist, but it's here as a hotfix for an issue with multi-spectator screen not proceeding to results screen.
236+
// see: https://github.com/ppy/osu/issues/19593
237+
if (state.State == SpectatedUserState.Playing)
238+
return;
239+
234240
RemoveUser(userId);
235241

236242
var instance = instances.Single(i => i.UserId == userId);

0 commit comments

Comments
 (0)