Mercurial > hg > openttd
changeset 6820:422a8e98d0f4 draft
(svn r10059) -Fix (r10045): Pretend GRF is still in initialisation state when leaving reservation stage. This fixes action 7/9 tests for grfs that will be active.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Thu, 07 Jun 2007 18:13:31 +0000 |
parents | ffc184231f4a |
children | c5c3e3c707e5 |
files | src/newgrf.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -4830,7 +4830,7 @@ _cur_grffile = GetFileByFilename(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_ACTIVATION && config->status != GCS_ACTIVATED) return; + if (stage == GLS_ACTIVATION && config->status != GCS_INITIALISED) return; } FioOpenFile(file_index, filename); @@ -4945,7 +4945,9 @@ if (stage == GLS_LABELSCAN) InitNewGRFFile(c, _cur_spriteid); LoadNewGRFFile(c, slot++, stage); - if (stage == GLS_ACTIVATION) { + if (stage == GLS_RESERVE) { + if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED; + } else if (stage == GLS_ACTIVATION) { ClearTemporaryNewGRFData(); BuildCargoTranslationMap(); DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid);