(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.
authorbelugas
Fri, 12 Oct 2007 15:54:49 +0000
changeset 7714 24777a3bda1c
parent 7713 cd8e8c7454d9
child 7715 30676332c367
(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
src/newgrf_commons.cpp
--- a/src/newgrf_commons.cpp	Fri Oct 12 00:43:18 2007 +0000
+++ b/src/newgrf_commons.cpp	Fri Oct 12 15:54:49 2007 +0000
@@ -195,10 +195,10 @@
 
 	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 {