summaryrefslogtreecommitdiff
path: root/src/network/network_udp.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-03-06 19:33:28 +0000
committermaedhros <maedhros@openttd.org>2007-03-06 19:33:28 +0000
commit1c7df202c649b4dad5fe5e5f53fb33191a440724 (patch)
treedd3c567c0980606c17509a28df3ceea5975adb03 /src/network/network_udp.cpp
parent429c41ea51d142a7e99d20beba7bcd2ce99d747c (diff)
downloadopenttd-1c7df202c649b4dad5fe5e5f53fb33191a440724.tar.xz
(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.
Diffstat (limited to 'src/network/network_udp.cpp')
-rw-r--r--src/network/network_udp.cpp6
1 files changed, 3 insertions, 3 deletions
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;