From ed4a9edba557a2302d159a8d08b9067beec1be73 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 7 Jul 2007 18:01:26 +0000 Subject: [PATCH] (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 | 2 +- window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/industry_cmd.c b/industry_cmd.c index 023d1ec6a7..131930e899 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -1618,7 +1618,7 @@ static void ExtChangeIndustryProduction(Industry *i) 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); } diff --git a/window.c b/window.c index 87e28c0584..599e55151c 100644 --- a/window.c +++ b/window.c @@ -610,8 +610,8 @@ static Window *LocalAllocateWindow( _last_z_window++; } - SetWindowDirty(w); CallWindowEventNP(w, WE_CREATE); + SetWindowDirty(w); return w; }