Files
OpenFrontIO/src/server
FloPinguin 6154b779f5 Fix compact map playercount 🔧 (#3361)
## Description:

The recently improved `supportsCompactMapForTeams` only checked that
each team had ≥2 players but not that there were ≥2 teams. On very small
maps with compact + Duos (rare), this allowed lobbies with 1 team of 2,
which makes no sense (Wonder noticed that randomly while looking at the
homepage). Added a `numberOfTeams ≥ 2` check so the compact map modifier
isn't active when the player count can't sustain multiple teams.

The 125-player performance cap was also applied inside
`calculateMapPlayerCounts` before the compact 75% reduction, so a map
sized for 200 players would get capped to 125 then reduced to 31 instead
of the expected 50. Moved the cap (`MAX_PLAYER_COUNT`) to after the
compact reduction.

## 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

## Please put your Discord username so you can be contacted if a bug or
regression is found:

FloPinguin
2026-03-05 15:21:35 -08:00
..
2026-03-03 14:07:06 -08:00
2026-03-03 14:07:06 -08:00
2025-12-12 16:49:22 -08:00
2025-09-11 21:28:03 -07:00
2026-03-05 15:21:35 -08:00
2025-07-21 16:05:35 -07:00
2026-02-09 21:05:59 -08:00

Gatekeeper

Security module for botting, rate limiting, fingerprinting, etc.