From 4ecb3eb33c67c880bbbf08b5aff5483fe9bfb7d6 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 14 Jan 2010 23:06:41 +0000 Subject: (svn r18804) -Codechange: guard against binaries claiming to be compatible with a future (stable) release of OpenTTD. --- src/network/network_client.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/network/network_client.cpp') diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index dd9f2a7f8..592c210de 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -189,6 +189,13 @@ DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GETMAP) */ Packet *p = new Packet(PACKET_CLIENT_GETMAP); + /* Send the OpenTTD version to the server, let it validate it too. + * But only do it for stable releases because of those we are sure + * that everybody has the same NewGRF version. For trunk and the + * branches we make tarballs of the OpenTTDs compiled from tarball + * will have the lower bits set to 0. As such they would become + * incompatible, which we would like to prevent by this. */ + if (HasBit(_openttd_newgrf_version, 19)) p->Send_uint32(_openttd_newgrf_version); MY_CLIENT->Send_Packet(p); } -- cgit v1.2.3-70-g09d2