diff options
author | maedhros <maedhros@openttd.org> | 2007-04-12 18:23:47 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-04-12 18:23:47 +0000 |
commit | 39b193efb682229d87fe5917dd288581c5fdc178 (patch) | |
tree | 5e3ffef71c2270c2e429f71ae24a4d11487895ce /src | |
parent | 61fe35688046b7ef36305ebd92b79bfcc535783f (diff) | |
download | openttd-39b193efb682229d87fe5917dd288581c5fdc178.tar.xz |
(svn r9614) -Feature: Use the normal growth rate values when the growth rate is set to none and "Fund new buildings" is used.
Diffstat (limited to 'src')
-rw-r--r-- | src/town_cmd.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 13d32d24e..31e76fb83 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1687,7 +1687,7 @@ static void UpdateTownGrowRate(Town *t) } CLRBIT(t->flags12, TOWN_IS_FUNDED); - if (_patches.town_growth_rate == 0) return; + if (_patches.town_growth_rate == 0 && t->fund_buildings_months == 0) return; /** Towns are processed every TOWN_GROWTH_FREQUENCY ticks, and this is the * number of times towns are processed before a new building is built. */ @@ -1712,7 +1712,11 @@ static void UpdateTownGrowRate(Town *t) return; } - m >>= (_patches.town_growth_rate - 1); + /* Use the normal growth rate values if new buildings have been funded in + * this town and the growth rate is set to none. */ + uint growth_multiplier = _patches.town_growth_rate != 0 ? _patches.town_growth_rate - 1 : 1; + + m >>= growth_multiplier; if (_patches.larger_towns != 0 && (t->index % _patches.larger_towns) == 0) m /= 2; t->growth_rate = m / (t->num_houses / 50 + 1); |