Skip to content

Commit

Permalink
Merge pull request #4160 from WilliamQiufeng/duplicate-players-fix
Browse files Browse the repository at this point in the history
Fix logic for adding players
  • Loading branch information
AiAe committed Jun 1, 2024
2 parents 4697fce + b9eb361 commit 05cb46f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Quaver.Shared/Online/OnlineManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ private static void OnUserJoinedGame(object sender, UserJoinedGameEventArgs e)
if (CurrentGame == null)
return;

if (CurrentGame.Players.Any(x => x.Id != e.UserId))
if (CurrentGame.Players.All(x => x.Id != e.UserId))
CurrentGame.Players.Add(OnlineUsers[e.UserId].OnlineUser);

if (!CurrentGame.PlayerIds.Contains(e.UserId))
Expand Down

0 comments on commit 05cb46f

Please sign in to comment.