summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-11-04 22:24:03 +0000
committerglx <glx@openttd.org>2007-11-04 22:24:03 +0000
commit74ee13aba89f78df25066ee15c46fa682d6a1408 (patch)
treecd0e25b8a0622ff40fa75f65047e24b6d9af09e1 /src/newgrf.cpp
parent354fdbc0c940e30040a81c1ab96a87cfbdb0c76a (diff)
downloadopenttd-74ee13aba89f78df25066ee15c46fa682d6a1408.tar.xz
(svn r11381) -Fix [FS#1227]: redo the fix in a less breaking way
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 9b2aafce2..f02feadaa 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5426,7 +5426,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
_cur_grffile = GetFileByFilename(filename);
if (_cur_grffile == NULL) error("File '%s' lost in cache.\n", filename);
if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return;
- if (stage == GLS_ACTIVATION && config->status != GCS_INITIALISED) return;
+ if (stage == GLS_ACTIVATION && !HASBIT(config->flags, GCF_RESERVED)) return;
}
if (file_index > LAST_GRF_SLOT) {
@@ -5560,8 +5560,9 @@ void LoadNewGRF(uint load_index, uint file_index)
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
LoadNewGRFFile(c, slot++, stage);
if (stage == GLS_RESERVE) {
- if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
+ SETBIT(c->flags, GCF_RESERVED);
} else if (stage == GLS_ACTIVATION) {
+ CLRBIT(c->flags, GCF_RESERVED);
ClearTemporaryNewGRFData();
BuildCargoTranslationMap();
DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);