mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 21:49:10 +00:00
(svn r22805) -Codechange: move use of magic number for version checking to more logical location
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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. */
|
||||
|
Reference in New Issue
Block a user