From 4c1ea4020d797e2ddb086cc73109eb8c51cbbbdb Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Tue, 10 Aug 2021 20:03:13 +0200 Subject: 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. --- src/network/core/game_info.cpp | 5 ++--- src/network/core/game_info.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/network/core') diff --git a/src/network/core/game_info.cpp b/src/network/core/game_info.cpp index ebc78fffc..1576ae413 100644 --- a/src/network/core/game_info.cpp +++ b/src/network/core/game_info.cpp @@ -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: diff --git a/src/network/core/game_info.h b/src/network/core/game_info.h index 91fd96ad9..95073f6c2 100644 --- a/src/network/core/game_info.h +++ b/src/network/core/game_info.h @@ -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. -- cgit v1.2.3-70-g09d2