Skip to content

Commit

Permalink
Fix multi-spectator test updating state after removing user
Browse files Browse the repository at this point in the history
Removing user triggers `playingUsers.Remove`, but doing so before
updating the state leads to `EndGameplay` being called with `State ==
Playing` rather than `Quit`.
  • Loading branch information
frenzibyte committed Aug 6, 2022
1 parent 84ef24c commit 789e8b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ private void end(int userId)
{
var user = playingUsers.Single(u => u.UserID == userId);

OnlinePlayDependencies.MultiplayerClient.RemoveUser(user.User.AsNonNull());
SpectatorClient.SendEndPlay(userId);
OnlinePlayDependencies.MultiplayerClient.RemoveUser(user.User.AsNonNull());

playingUsers.Remove(user);
});
Expand Down

0 comments on commit 789e8b4

Please sign in to comment.