(svn r11528) -Fix (r11500): With smooth economy enabled, industries that should only decrease production would always increase it when more than 60% was transported.
authormaedhros
Mon, 26 Nov 2007 19:23:53 +0000
changeset 7972 8c4b44015a5f
parent 7971 8509d595142a
child 7973 4ff33d345b21
(svn r11528) -Fix (r11500): With smooth economy enabled, industries that should only decrease production would always increase it when more than 60% was transported.
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Mon Nov 26 17:50:22 2007 +0000
+++ b/src/industry_cmd.cpp	Mon Nov 26 19:23:53 2007 +0000
@@ -2052,7 +2052,11 @@
 
 				new_prod = old_prod = i->production_rate[j];
 
-				if (only_decrease || Chance16(1, 3)) mult *= -1;
+				if (only_decrease) {
+					mult = -1;
+				} else if (Chance16(1, 3)) {
+					mult *= -1;
+				}
 
 				if (Chance16(1, 22)) {
 					new_prod += mult * (max(((RandomRange(50) + 10) * old_prod) >> 8, 1U));