summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-10-12 15:54:49 +0000
committerbelugas <belugas@openttd.org>2007-10-12 15:54:49 +0000
commite4fdc7ce512aedf4b63dd19edc2fa39a5645cddd (patch)
tree91ae10a848202f89197521cfcb45e56dbb04cf02
parent9934cb8a1c24b6e041b7c6f9192c5d2d1d0b8bd2 (diff)
downloadopenttd-e4fdc7ce512aedf4b63dd19edc2fa39a5645cddd.tar.xz
(svn r11248) -Fix[FS#1314]: The logic behind industry slot allocation was implying that the only condition an override could be placed in a slot is that there were no previous override.
That is not exact: the slot must not have been occupied by an industry coming from a grf. So now, tourist center is available if more then one grf is used
-rw-r--r--src/newgrf_commons.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index 68269c643..2ba38fe6e 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -195,10 +195,10 @@ void IndustryOverrideManager::SetEntitySpec(IndustrySpec *inds)
if (ind_id == invalid_ID) { // not found? So this is the introduction of a new industry
/* Second step is dealing with the override. */
- if (inds->grf_prop.override != invalid_ID && _industry_specs[inds->grf_prop.override].grf_prop.override == invalid_ID) {
+ if (inds->grf_prop.override != invalid_ID && _industry_specs[inds->grf_prop.override].grf_prop.grffile == NULL) {
/* this is an override, which means it will take the place of the industry it is
* designed to replace. Before we conclude that the override is allowed,
- * we first need to verify that the slot is not holding another override
+ * we first need to verify that the slot is not holding another industry from a grf
* If it's the case,it will be considered as a normal substitute */
ind_id = inds->grf_prop.override;
} else {