diff options
author | peter1138 <peter1138@openttd.org> | 2007-06-07 18:13:31 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-06-07 18:13:31 +0000 |
commit | c1df3a8aa63645f31fe99d506f0ceb45e3085326 (patch) | |
tree | b89864d6a8c1098e235a93930dca89b4df45510e /src | |
parent | 8a74b2ebe179500f1e95647cdf4a2e740ea1df23 (diff) | |
download | openttd-c1df3a8aa63645f31fe99d506f0ceb45e3085326.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index a646b686d..f91f947d6 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -4830,7 +4830,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage) _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 @@ void LoadNewGRF(uint load_index, uint file_index) 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); |