summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-21 18:57:45 +0000
committerrubidium <rubidium@openttd.org>2011-08-21 18:57:45 +0000
commitf6b0561cd86f363c93b64817f26e3ed7f5b1b688 (patch)
tree07d1a5705f1a2c9a620b49650baec53cd84fba27 /src/network
parent786ae457f1555ed4da8926e9d796f6d88f54398a (diff)
downloadopenttd-f6b0561cd86f363c93b64817f26e3ed7f5b1b688.tar.xz
(svn r22805) -Codechange: move use of magic number for version checking to more logical location
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_client.cpp2
-rw-r--r--src/network/network_server.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 1f16332c9..5e03e638a 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -381,7 +381,7 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendGetMap()
* 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);
+ if (IsReleasedVersion()) p->Send_uint32(_openttd_newgrf_version);
my_client->SendPacket(p);
return NETWORK_RECV_STATUS_OKAY;
}
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index bd4b16056..507c9232e 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -975,7 +975,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Receive_CLIENT_GETMAP(Packet *
* 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)) {
+ if (IsReleasedVersion()) {
if (_openttd_newgrf_version != p->Recv_uint32()) {
/* The version we get from the client differs, it must have the
* wrong version. The client must be wrong. */