|
|
@ -5426,7 +5426,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
|
|
|
|
_cur_grffile = GetFileByFilename(filename);
|
|
|
|
_cur_grffile = GetFileByFilename(filename);
|
|
|
|
if (_cur_grffile == NULL) error("File '%s' lost in cache.\n", filename);
|
|
|
|
if (_cur_grffile == NULL) error("File '%s' lost in cache.\n", filename);
|
|
|
|
if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return;
|
|
|
|
if (stage == GLS_RESERVE && config->status != GCS_INITIALISED) return;
|
|
|
|
if (stage == GLS_ACTIVATION && config->status != GCS_INITIALISED) return;
|
|
|
|
if (stage == GLS_ACTIVATION && !HASBIT(config->flags, GCF_RESERVED)) return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (file_index > LAST_GRF_SLOT) {
|
|
|
|
if (file_index > LAST_GRF_SLOT) {
|
|
|
@ -5560,8 +5560,9 @@ void LoadNewGRF(uint load_index, uint file_index)
|
|
|
|
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;
|
|
|
|
SETBIT(c->flags, GCF_RESERVED);
|
|
|
|
} else if (stage == GLS_ACTIVATION) {
|
|
|
|
} else if (stage == GLS_ACTIVATION) {
|
|
|
|
|
|
|
|
CLRBIT(c->flags, GCF_RESERVED);
|
|
|
|
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);
|
|
|
|