diff options
author | Patric Stout <truebrain@openttd.org> | 2021-08-10 20:03:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 20:03:13 +0200 |
commit | 4c1ea4020d797e2ddb086cc73109eb8c51cbbbdb (patch) | |
tree | bc8b65fe81b89f8d73e3dcd27ad458fcc0f35ffd /src/network/core | |
parent | 8a083cd7f81d8223f08c30d5bcb2d9c38e7556a4 (diff) | |
download | openttd-4c1ea4020d797e2ddb086cc73109eb8c51cbbbdb.tar.xz |
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.
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/game_info.cpp | 5 | ||||
-rw-r--r-- | src/network/core/game_info.h | 1 |
2 files changed, 2 insertions, 4 deletions
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. |