From 66487d59fd5fdeb253361865cb4322347b0b18fb Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 1 Mar 2007 00:58:09 +0000 Subject: (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. --- src/network/network_udp.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/network/network_udp.cpp') 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; -- cgit v1.2.3-54-g00ecf