Mercurial > hg > openttd
changeset 7830:8c69a1f02856 draft
(svn r11380) -Revert (r11191, r11196): it worked, but broke cargo loading
author | glx <glx@openttd.org> |
---|---|
date | Sun, 04 Nov 2007 22:21:46 +0000 |
parents | 355243c3ab8a |
children | fa9e8633d075 |
files | src/newgrf.cpp |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5545,7 +5545,7 @@ /* 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 @@ 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++; } } }