Skip to content

Commit 20d7f0f

Browse files
fix: reuse already-found user in ParticipantsList instead of redundant lookup
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/c574fc49-f3fa-4386-9706-f05472318292 Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent ebdfbf4 commit 20d7f0f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

osu.Game/Screens/OnlinePlay/Multiplayer/Participants/ParticipantsList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private void updateState()
6464
for (byte i = 0; i < slotUserIds.Length; ++i)
6565
{
6666
var user = slotUserIds[i] != null ? client.Room.Users.SingleOrDefault(u => u.UserID == slotUserIds[i]) : null;
67-
var participant = user == null ? Slot.Empty(i) : Slot.FromUser(client.Room.Users.Single(u => u.UserID == slotUserIds[i]));
67+
var participant = user == null ? Slot.Empty(i) : Slot.FromUser(user);
6868

6969
if (i >= slots.Count)
7070
slots.Add(participant);

0 commit comments

Comments
 (0)