diff options
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/config.h | 2 | ||||
-rw-r--r-- | src/network/core/game.h | 1 | ||||
-rw-r--r-- | src/network/core/udp.cpp | 7 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/network/core/config.h b/src/network/core/config.h index 3488b1ff2..1483419ea 100644 --- a/src/network/core/config.h +++ b/src/network/core/config.h @@ -57,8 +57,6 @@ static const uint NETWORK_GRF_NAME_LENGTH = 80; ///< Maximum l */ static const uint NETWORK_MAX_GRF_COUNT = 62; -static const uint NETWORK_NUM_LANGUAGES = 36; ///< Number of known languages (to the network protocol) + 1 for 'any'. - /** * The number of landscapes in OpenTTD. * This number must be equal to NUM_LANDSCAPE, but as this number is used diff --git a/src/network/core/game.h b/src/network/core/game.h index 0a10cfb1f..29eca418f 100644 --- a/src/network/core/game.h +++ b/src/network/core/game.h @@ -42,7 +42,6 @@ struct NetworkGameInfo : NetworkServerGameInfo { bool compatible; ///< Can we connect to this server or not? (based on server_revision _and_ grf_match bool use_password; ///< Is this server passworded? byte game_info_version; ///< Version of the game info - byte server_lang; ///< Language of the server (we should make a nice table for this) byte clients_max; ///< Max clients allowed on server byte companies_on; ///< How many started companies do we have byte companies_max; ///< Max companies allowed on server diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index 985c8fa72..72fec49e1 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -200,7 +200,7 @@ void NetworkUDPSocketHandler::SendNetworkGameInfo(Packet *p, const NetworkGameIn /* NETWORK_GAME_INFO_VERSION = 1 */ p->Send_string(info->server_name); p->Send_string(info->server_revision); - p->Send_uint8 (info->server_lang); + p->Send_uint8 (0); // Used to be server-lang. p->Send_bool (info->use_password); p->Send_uint8 (info->clients_max); p->Send_uint8 (info->clients_on); @@ -266,7 +266,7 @@ void NetworkUDPSocketHandler::ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo case 1: p->Recv_string(info->server_name, sizeof(info->server_name)); p->Recv_string(info->server_revision, sizeof(info->server_revision)); - info->server_lang = p->Recv_uint8 (); + p->Recv_uint8 (); // Used to contain server-lang. info->use_password = p->Recv_bool (); info->clients_max = p->Recv_uint8 (); info->clients_on = p->Recv_uint8 (); @@ -281,8 +281,7 @@ void NetworkUDPSocketHandler::ReceiveNetworkGameInfo(Packet *p, NetworkGameInfo info->map_set = p->Recv_uint8 (); info->dedicated = p->Recv_bool (); - if (info->server_lang >= NETWORK_NUM_LANGUAGES) info->server_lang = 0; - if (info->map_set >= NETWORK_NUM_LANDSCAPES) info->map_set = 0; + if (info->map_set >= NETWORK_NUM_LANDSCAPES) info->map_set = 0; } } |