Changing Maximum Player Count: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
'''NOTE:''' | '''NOTE:''' | ||
As of February 5, 2008, this only applies to the HL2DM OB (Orange Box) source code. | |||
---- | ---- |
Revision as of 18:25, 5 February 2009
NOTE: As of February 5, 2008, this only applies to the HL2DM OB (Orange Box) source code.
Problem:
- You are unable to create a server with more than 16 players.
Cause:
- For whatever reason, Valve decided to limit the maximum amount of players to 16 by altering the way maxplayers works. Fortunately, this is easy to fix.
Solution:
- Open hl2mp_gameinterface.cpp and make the following changes:
REPLACE THIS:
void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers ) const { minplayers = defaultMaxPlayers = 2; maxplayers = 16; }
WITH THIS:
void CServerGameClients::GetPlayerLimits( int& minplayers, int& maxplayers, int &defaultMaxPlayers ) const { minplayers = defaultMaxPlayers = 2; maxplayers = 32; }
Now you can have up to 32 players on your server at any given time. It is not recommended to go any higher, because after 32 players, your mod may become unstable.