1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

Change maximum room number to closest powers of two

This commit is contained in:
Salman Ahmed 2024-03-11 09:54:49 +03:00
parent 226df7163e
commit 169e2e1b4e

View File

@ -142,9 +142,8 @@ namespace osu.Desktop
Privacy = string.IsNullOrEmpty(room.Settings.Password) ? Party.PrivacySetting.Public : Party.PrivacySetting.Private,
ID = room.RoomID.ToString(),
// technically lobbies can have infinite users, but Discord needs this to be set to something.
// 1024 just happens to look nice.
// https://discord.com/channels/188630481301012481/188630652340404224/1212967974793642034
Max = 1024,
// to make party display sensible, assign a powers of two above participants count (8 at minimum).
Max = (int)Math.Max(8, Math.Pow(2, Math.Ceiling(Math.Log2(room.Users.Count)))),
Size = room.Users.Count,
};