(svn r22032) -Codechange: add some asserts to verify we don't allocate too many NetworkClientSockets/Infos
This commit is contained in:
@@ -682,6 +682,8 @@ static void NetworkInitGameInfo()
|
||||
/* The server is a client too */
|
||||
_network_game_info.clients_on = _network_dedicated ? 0 : 1;
|
||||
|
||||
/* There should be always space for the server. */
|
||||
assert(NetworkClientInfo::CanAllocateItem());
|
||||
NetworkClientInfo *ci = new NetworkClientInfo(CLIENT_ID_SERVER);
|
||||
ci->client_playas = _network_dedicated ? COMPANY_SPECTATOR : _local_company;
|
||||
/* Give the server a valid IP; banning it is pointless anyways */
|
||||
|
Reference in New Issue
Block a user