diff options
author | Patric Stout <truebrain@openttd.org> | 2021-04-20 16:51:15 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-04-20 17:24:38 +0200 |
commit | 05612d60ae0af94b9313d5a8b78ebf58a3eeab66 (patch) | |
tree | 6f84698665d5931520d41ef23117e4013c575e10 /src/network/core/udp.cpp | |
parent | f4bd3fff5ebfdd7c58ccaf23977b8447c740b48a (diff) | |
download | openttd-05612d60ae0af94b9313d5a8b78ebf58a3eeab66.tar.xz |
Remove: "language" field from server/client
The original idea was that people could find a server they could
talk in their native language on. This isn't really used in that
way. There are several reasons for removing this:
- the client also sends his "language" to the server, but nothing
is doing anything with this.
- flags are a bad way to represent languages, and over the years
we had several (rightfully) complaints about this.
- most servers have their language set to "All", and prefix the
servername with the language it is about. This is a much more
efficient way to do the same.
All in all, this feature should go back to the drawing board.
Maybe it could work in another form, but this form is not it.
Diffstat (limited to 'src/network/core/udp.cpp')
-rw-r--r-- | src/network/core/udp.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
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; } } |