diff options
author | glx <glx@openttd.org> | 2007-10-02 20:20:14 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-10-02 20:20:14 +0000 |
commit | dca398e9a6db5f0366c53b2d7a115814d5090a72 (patch) | |
tree | 13b09893ca498ddb4b9a0ebe6994bcc97d864f2e | |
parent | a5e876132539824cc9c8b8e370b205c835e30f73 (diff) | |
download | openttd-dca398e9a6db5f0366c53b2d7a115814d5090a72.tar.xz |
(svn r11196) -Fix (r11191): _cur_stage was incorrect for GLS_ACTIVATION stage
-rw-r--r-- | src/newgrf.cpp | 6 |
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++; } } } |