summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-10-02 20:20:14 +0000
committerglx <glx@openttd.org>2007-10-02 20:20:14 +0000
commita2ed316770caa49fc5d70aaf69c983984a284925 (patch)
tree13b09893ca498ddb4b9a0ebe6994bcc97d864f2e /src
parent54c7430e46fc6ccc9f0615727fa8109bfb86675a (diff)
downloadopenttd-a2ed316770caa49fc5d70aaf69c983984a284925.tar.xz
(svn r11196) -Fix (r11191): _cur_stage was incorrect for GLS_ACTIVATION stage
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 88fdc07ae..a3b8115a0 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5508,13 +5508,17 @@ void LoadNewGRF(uint load_index, uint file_index)
if (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
- LoadNewGRFFile(c, slot++, stage);
+ LoadNewGRFFile(c, slot, stage);
if (stage == GLS_RESERVE) {
if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
+ _cur_stage = GLS_ACTIVATION;
LoadNewGRFFile(c, slot++, GLS_ACTIVATION);
+ _cur_stage = stage;
ClearTemporaryNewGRFData();
BuildCargoTranslationMap();
DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);
+ } else {
+ slot++;
}
}
}