(svn r10467) [0.5] -Backport from trunk (r10406, r10465): 0.5
authorrubidium
Sat, 07 Jul 2007 18:01:26 +0000
branch0.5
changeset 5524 137860f300b2
parent 5523 830e723086fa
child 5525 f7bf20490cdd
(svn r10467) [0.5] -Backport from trunk (r10406, r10465):
- Fix: Visual glitches when a window is resized in the WE_CREATE callback (r10465)
- Fix: Only industries in the temperate climate should be affected by the "do not increase production" flag [FS#968] (r10406)
industry_cmd.c
window.c
--- a/industry_cmd.c	Sat Jun 30 15:13:55 2007 +0000
+++ b/industry_cmd.c	Sat Jul 07 18:01:26 2007 +0000
@@ -1618,7 +1618,7 @@
 				if (CHANCE16I(20, 1024, r)) new -= max(((RandomRange(50) + 10) * old) >> 8, 1U);
 				/* Chance of increasing becomes better when more is transported */
 				if (CHANCE16I(20 + (i->pct_transported[j] * 20 >> 8), 1024, r >> 16) &&
-						i->type != IT_OIL_WELL) {
+						(i->type != IT_OIL_WELL || _opt.landscape != LT_NORMAL)) {
 					new += max(((RandomRange(50) + 10) * old) >> 8, 1U);
 				}
 
--- a/window.c	Sat Jun 30 15:13:55 2007 +0000
+++ b/window.c	Sat Jul 07 18:01:26 2007 +0000
@@ -610,8 +610,8 @@
 		_last_z_window++;
 	}
 
+	CallWindowEventNP(w, WE_CREATE);
 	SetWindowDirty(w);
-	CallWindowEventNP(w, WE_CREATE);
 
 	return w;
 }