Skip to content

Conversation

@Rainyan
Copy link
Collaborator

@Rainyan Rainyan commented Jul 10, 2025

Description

Since the x64 update 2fdf6fb, the engine's MAX_PLAYERS limit (for x64) has increased from 33 to 101. Update the main menu's server creation panel slider value to use this definition, instead of hardcoding 32 as the upper bound.

We're using MAX_PLAYERS-1 because as per

//You might be wondering why these aren't multiple of 2. Well the reason is that if servers decide to have HLTV or Replay enabled we need the extra slot.
//This is ok since MAX_PLAYERS is used for code specific things like arrays and loops, but it doesn't really means that this is the max number of players allowed
//Since this is decided by the gamerules (and it can be whatever number as long as its less than MAX_PLAYERS).
the maximum gamerules allowed players should be <MAX_PLAYERS to make room for the SourceTV/replay bot on the last allocated slot.

Toolchain

  • Windows MSVC VS2022

Linked Issues

Since the x64 update 2fdf6fb, the engine's MAX_PLAYERS limit (for x64)
has increased from 33 to 101. Update the main menu's server creation
panel slider value to use this definition, instead of hardcoding 32 as
the upper bound.

We're using MAX_PLAYERS-1 because as per
https://github.com/NeotokyoRebuild/neo/blob/8f0fee0b0e4760af3851afb856815de9db2a9250/src/game/shared/shareddefs.h#L285-L287
the maximum gamerules allowed players should be <MAX_PLAYERS to make
room for the SourceTV/replay bot on the last allocated slot.
@Rainyan
Copy link
Collaborator Author

Rainyan commented Jul 10, 2025

Although we might want to revisit this in some form of gamerules-driven maxplayers restrictions, for example restricting CTG mode to parity at 32. Or even lower. But for now, this PR just makes it possible to set the engine-supported maxplayers via the GUI interface, since it could already be done with console commands.

Discord discussion context: https://discord.com/channels/1235346473827434517/1244281729036845200/1392815890684313720

@Rainyan
Copy link
Collaborator Author

Rainyan commented Jul 10, 2025

Closing for now since there's no consensus on how the max players limit should be handled.

@Rainyan Rainyan closed this Jul 10, 2025
@Rainyan Rainyan mentioned this pull request Jul 10, 2025
@Rainyan Rainyan deleted the bug/maxplayers branch July 10, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant