diff options
author | rubidium <rubidium@openttd.org> | 2007-03-01 00:58:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-01 00:58:09 +0000 |
commit | 66487d59fd5fdeb253361865cb4322347b0b18fb (patch) | |
tree | ebdcf69054797bb9fc5617433a69657bed21ed6f /src/network/network_udp.cpp | |
parent | 3dc71e3484564a5a6546749ecf61d63d0de65879 (diff) | |
download | openttd-66487d59fd5fdeb253361865cb4322347b0b18fb.tar.xz |
(svn r8949) -Codechange: only test the first NETWORK_REVISION_LENGTH - 1 characters when determining network compatability. This makes it possible to have 'long' branch names while still being able to play network games.
Diffstat (limited to 'src/network/network_udp.cpp')
-rw-r--r-- | src/network/network_udp.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 9bf7f344c..4dab77b8b 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -261,7 +261,6 @@ public: DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE) { - extern const char _openttd_revision[]; NetworkGameList *item; // Just a fail-safe.. should never happen @@ -316,9 +315,7 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE) snprintf(item->info.hostname, sizeof(item->info.hostname), "%s", inet_ntoa(client_addr->sin_addr)); /* Check if we are allowed on this server based on the revision-match */ - item->info.version_compatible = - strcmp(item->info.server_revision, _openttd_revision) == 0 || - strcmp(item->info.server_revision, NOREV_STRING) == 0; + item->info.version_compatible = IsNetworkCompatibleVersion(item->info.server_revision); item->info.compatible &= item->info.version_compatible; // Already contains match for GRFs item->online = true; |