summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2007-11-04 22:21:46 +0000
committerglx <glx@openttd.org>2007-11-04 22:21:46 +0000
commit6c9617b4aedb25f61e2c7c300f7291e2aac31c79 (patch)
tree18644e63c540a91304320b2bdd9df660a5be89f3 /src
parent508c13d1f975d599e6742f6e7fdcfa279e57ebf9 (diff)
downloadopenttd-6c9617b4aedb25f61e2c7c300f7291e2aac31c79.tar.xz
(svn r11380) -Revert (r11191, r11196): it worked, but broke cargo loading
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 35090474f..9b2aafce2 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5545,7 +5545,7 @@ void LoadNewGRF(uint load_index, uint file_index)
/* Load newgrf sprites
* in each loading stage, (try to) open each file specified in the config
* and load information from it. */
- for (GrfLoadingStage stage = GLS_LABELSCAN; stage < GLS_ACTIVATION; stage++) {
+ for (GrfLoadingStage stage = GLS_LABELSCAN; stage <= GLS_ACTIVATION; stage++) {
uint slot = file_index;
_cur_stage = stage;
@@ -5558,17 +5558,13 @@ 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;
+ } else if (stage == GLS_ACTIVATION) {
ClearTemporaryNewGRFData();
BuildCargoTranslationMap();
DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);
- } else {
- slot++;
}
}
}