diff -r 82fcd37b5268 src/town_cmd.cpp --- a/src/town_cmd.cpp Tue Nov 24 00:03:35 2015 +0300 +++ b/src/town_cmd.cpp Tue Nov 24 03:19:22 2015 +0300 @@ -1546,6 +1546,11 @@ t->supplied[CT_MAIL].old_max = t->cache.population >> 4; } +static void UpdateTownGrowCounter(Town *t, uint prev_growth_rate); +static uint GetNormalGrowthRate(Town *t); +static void UpdateTownGrowthRate(Town *t); +static void UpdateTownGrowth(Town *t); + /** * Does the actual town creation. * @@ -1623,6 +1628,7 @@ t->cache.num_houses -= x; UpdateTownRadius(t); + UpdateTownGrowthRate(t); UpdateTownMaxPass(t); UpdateAirportsNoise(); } @@ -2388,6 +2394,7 @@ MakeTownHouse(tile, t, construction_counter, construction_stage, house, random_bits); UpdateTownRadius(t); UpdateTownCargoes(t, tile); + UpdateTownGrowthRate(t); return true; } @@ -2471,6 +2478,7 @@ if (eflags & BUILDING_HAS_4_TILES) DoClearTownHouseHelper(tile + TileDiffXY(1, 1), t, ++house); UpdateTownRadius(t); + UpdateTownGrowthRate(t); /* Update cargo acceptance. */ UpdateTownCargoes(t, tile); @@ -2522,11 +2530,6 @@ return NULL; } -static void UpdateTownGrowCounter(Town *t, uint prev_growth_rate); -static uint GetNormalGrowthRate(Town *t); -static void UpdateTownGrowthRate(Town *t); -static void UpdateTownGrowth(Town *t); - /** * Change the cargo goal of a town. * @param tile Unused. @@ -2657,6 +2660,7 @@ } } UpdateTownRadius(t); + UpdateTownGrowthRate(t); UpdateTownMaxPass(t); } @@ -2906,6 +2910,7 @@ t->fund_buildings_months = 3; /* Enable growth (also checking GameScript's opinion) */ + UpdateTownGrowthRate(t); UpdateTownGrowth(t); SetWindowDirty(WC_TOWN_VIEW, t->index); @@ -3183,8 +3188,6 @@ */ static void UpdateTownGrowth(Town *t) { - UpdateTownGrowthRate(t); - SetWindowDirty(WC_TOWN_VIEW, t->index); ClrBit(t->flags, TOWN_IS_GROWING);