mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-22 15:11:54 +00:00
(svn r11380) -Revert (r11191, r11196): it worked, but broke cargo loading
This commit is contained in:
parent
508c13d1f9
commit
6c9617b4ae
@ -5545,7 +5545,7 @@ void LoadNewGRF(uint load_index, uint file_index)
|
|||||||
/* Load newgrf sprites
|
/* Load newgrf sprites
|
||||||
* in each loading stage, (try to) open each file specified in the config
|
* in each loading stage, (try to) open each file specified in the config
|
||||||
* and load information from it. */
|
* 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;
|
uint slot = file_index;
|
||||||
|
|
||||||
_cur_stage = stage;
|
_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 (!FioCheckFileExists(c->filename)) error("NewGRF file is missing '%s'", c->filename);
|
||||||
|
|
||||||
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
|
if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid);
|
||||||
LoadNewGRFFile(c, slot, stage);
|
LoadNewGRFFile(c, slot++, stage);
|
||||||
if (stage == GLS_RESERVE) {
|
if (stage == GLS_RESERVE) {
|
||||||
if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
|
if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
|
||||||
_cur_stage = GLS_ACTIVATION;
|
} else if (stage == GLS_ACTIVATION) {
|
||||||
LoadNewGRFFile(c, slot++, GLS_ACTIVATION);
|
|
||||||
_cur_stage = stage;
|
|
||||||
ClearTemporaryNewGRFData();
|
ClearTemporaryNewGRFData();
|
||||||
BuildCargoTranslationMap();
|
BuildCargoTranslationMap();
|
||||||
DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);
|
DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);
|
||||||
} else {
|
|
||||||
slot++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user