From 2b65f5ce1765f9fecebd2b9dff44a6f247a9f71c Mon Sep 17 00:00:00 2001 From: Duwibi <86431918+Duwibi@users.noreply.github.com> Date: Sun, 1 Jun 2025 01:44:38 +0300 Subject: [PATCH] Cap lobby sizes at 150 (#984) ## Description: Currenly, it's possible for the World map to reach 225 players. This PR caps it at just 150. ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: Nikola123 --- src/core/configuration/DefaultConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 6a48d1826..bdb17e3ae 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -147,7 +147,7 @@ export abstract class DefaultServerConfig implements ServerConfig { const [l, m, s] = numPlayersConfig[map] ?? [50, 30, 20]; const r = Math.random(); const base = r < 0.3 ? l : r < 0.6 ? m : s; - return mode === GameMode.Team ? Math.ceil(base * 1.5) : base; + return Math.min(mode === GameMode.Team ? Math.ceil(base * 1.5) : base, 150); } workerIndex(gameID: GameID): number {