From 1c7df202c649b4dad5fe5e5f53fb33191a440724 Mon Sep 17 00:00:00 2001 From: maedhros Date: Tue, 6 Mar 2007 19:33:28 +0000 Subject: (svn r9031) -Codechange: Introduce grfconfig->status, and use it for states that are mutually exclusive. At the same time, add an INITIALISED state which makes it possible to check if a grf is not yet active but will be later on during the GLS_ACTIVATION loading stage. --- src/network/network_udp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/network/network_udp.cpp') diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 4dab77b8b..08d207d8b 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -288,8 +288,8 @@ DEF_UDP_RECEIVE_COMMAND(Client, PACKET_UDP_SERVER_RESPONSE) struct sockaddr_in out_addr; for (c = item->info.grfconfig; c != NULL; c = c->next) { - if (HASBIT(c->flags, GCF_NOT_FOUND)) item->info.compatible = false; - if (!HASBIT(c->flags, GCF_NOT_FOUND) || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue; + if (c->status == GCS_NOT_FOUND) item->info.compatible = false; + if (c->status == GCS_NOT_FOUND || strcmp(c->name, UNKNOWN_GRF_NAME_PLACEHOLDER) != 0) continue; in_request[in_request_count] = c; in_request_count++; } @@ -392,7 +392,7 @@ void ClientNetworkUDPSocketHandler::HandleIncomingNetworkGameInfoGRFConfig(GRFCo * already resolved name for this GRF (another server has sent the * name of the GRF already */ config->name = FindUnknownGRFName(config->grfid, config->md5sum, true); - SETBIT(config->flags, GCF_NOT_FOUND); + config->status = GCS_NOT_FOUND; } else { config->filename = f->filename; config->name = f->name; -- cgit v1.2.3-70-g09d2