Change: remove the ability to control "max spectators" (#9466)

Soon we will make "join game" join the game as spectator first,
so limiting the amount of spectators makes no sense anymore in
that context. Not sure it ever did make sense.
This commit is contained in:
Patric Stout
2021-08-10 20:03:13 +02:00
committed by GitHub
parent 8a083cd7f8
commit 4c1ea4020d
11 changed files with 5 additions and 74 deletions

View File

@@ -126,7 +126,6 @@ void FillStaticNetworkServerGameInfo()
_network_game_info.start_date = ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1);
_network_game_info.clients_max = _settings_client.network.max_clients;
_network_game_info.companies_max = _settings_client.network.max_companies;
_network_game_info.spectators_max = _settings_client.network.max_spectators;
_network_game_info.map_width = MapSizeX();
_network_game_info.map_height = MapSizeY();
_network_game_info.landscape = _settings_game.game_creation.landscape;
@@ -234,7 +233,7 @@ void SerializeNetworkGameInfo(Packet *p, const NetworkServerGameInfo *info, bool
/* NETWORK_GAME_INFO_VERSION = 2 */
p->Send_uint8 (info->companies_max);
p->Send_uint8 (info->companies_on);
p->Send_uint8 (info->spectators_max);
p->Send_uint8 (info->clients_max); // Used to be max-spectators
/* NETWORK_GAME_INFO_VERSION = 1 */
p->Send_string(info->server_name);
@@ -331,7 +330,7 @@ void DeserializeNetworkGameInfo(Packet *p, NetworkGameInfo *info, const GameInfo
case 2:
info->companies_max = p->Recv_uint8 ();
info->companies_on = p->Recv_uint8 ();
info->spectators_max = p->Recv_uint8 ();
p->Recv_uint8(); // Used to contain max-spectators.
FALLTHROUGH;
case 1:

View File

@@ -105,7 +105,6 @@ struct NetworkServerGameInfo {
byte companies_on; ///< How many started companies do we have
byte companies_max; ///< Max companies allowed on server
byte spectators_on; ///< How many spectators do we have?
byte spectators_max; ///< Max spectators allowed on server
byte landscape; ///< The used landscape
int gamescript_version; ///< Version of the gamescript.
std::string gamescript_name; ///< Name of the gamescript.