(svn r10099) -Fix(r9867, FS860): Use the specs of the to-be-created industry instead of the scanned industry
authorbelugas
Mon, 11 Jun 2007 14:25:38 +0000
changeset 6859 24e98db499c9
parent 6858 36b50a8fe66b
child 6860 b8c1512b6bcc
(svn r10099) -Fix(r9867, FS860): Use the specs of the to-be-created industry instead of the scanned industry
Spotted by Oxygene
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Mon Jun 11 14:23:04 2007 +0000
+++ b/src/industry_cmd.cpp	Mon Jun 11 14:25:38 2007 +0000
@@ -1308,7 +1308,7 @@
 		/* check if an industry that accepts the same goods is nearby */
 		if (DistanceMax(tile, i->xy) <= 14 &&
 				indspec->accepts_cargo[0] != CT_INVALID &&
-				indspec->accepts_cargo[0] == indspec->accepts_cargo[0] && (
+				indspec->accepts_cargo[0] == GetIndustrySpec(i->type)->accepts_cargo[0] && (
 					_game_mode != GM_EDITOR ||
 					!_patches.same_industry_close ||
 					!_patches.multiple_industry_per_town