summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-03-04 10:41:16 +0000
committerfrosch <frosch@openttd.org>2008-03-04 10:41:16 +0000
commit81f4fd8afffdd21f8e591f0e450f7386095b0499 (patch)
tree99d257adde842f7b393b0f10c6e78c6984b14803 /src
parent11c8050e3ff4a9cd222769a73a5b142f6ecfe3f6 (diff)
downloadopenttd-81f4fd8afffdd21f8e591f0e450f7386095b0499.tar.xz
(svn r12333) -Fix: Switch grfstatus from 'activated' back to 'will-be-active' between reservation- and activation-stage.
This fixes action7/9 conditions 0x06 to 0x0A to return the same in those two stages.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 46a8669e7..0b1d0122a 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5853,6 +5853,12 @@ void LoadNewGRF(uint load_index, uint file_index)
* 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++) {
+ /* Set activated grfs back to will-be-activated between reservation- and activation-stage.
+ * This ensures that action7/9 conditions 0x06 - 0x0A work correctly. */
+ for (GRFConfig *c = _grfconfig; c != NULL; c = c->next) {
+ if (c->status == GCS_ACTIVATED) c->status = GCS_INITIALISED;
+ }
+
uint slot = file_index;
_cur_stage = stage;