summaryrefslogtreecommitdiff
path: root/src/network/network_client.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-14 23:06:41 +0000
committerrubidium <rubidium@openttd.org>2010-01-14 23:06:41 +0000
commit4ecb3eb33c67c880bbbf08b5aff5483fe9bfb7d6 (patch)
treef1a9a89f06d42b643ac716f4967f157e81f255d0 /src/network/network_client.cpp
parentc390e8f00efe2036432dd2d5e7a07b5333952e66 (diff)
downloadopenttd-4ecb3eb33c67c880bbbf08b5aff5483fe9bfb7d6.tar.xz
(svn r18804) -Codechange: guard against binaries claiming to be compatible with a future (stable) release of OpenTTD.
Diffstat (limited to 'src/network/network_client.cpp')
-rw-r--r--src/network/network_client.cpp7
1 files changed, 7 insertions, 0 deletions
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);
}