diff options
author | truebrain <truebrain@openttd.org> | 2011-11-25 11:35:15 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-11-25 11:35:15 +0000 |
commit | 7ff6daee8066276207f7e9fd6f10e9da3b4b1019 (patch) | |
tree | a570f508f0f8473afcbfb6a30f017ed02535f279 /src | |
parent | 8062c802190b57ac4e139d07602761faaa8ea568 (diff) | |
download | openttd-7ff6daee8066276207f7e9fd6f10e9da3b4b1019.tar.xz |
(svn r23323) -Fix: when you fund a town, it should grow; goals reached or not
Diffstat (limited to 'src')
-rw-r--r-- | src/town_cmd.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 745eed350..a1d9cdf9e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2775,11 +2775,13 @@ static void UpdateTownGrowRate(Town *t) if (_settings_game.economy.town_growth_rate == 0 && t->fund_buildings_months == 0) return; - /* Check if all goals are reached for this town to grow */ - for (int i = TE_BEGIN; i < TE_END; i++) { - if (t->goal[i] == TOWN_GROWTH_WINTER && TileHeight(t->xy) >= GetSnowLine() && t->received[i].old_act == 0 && t->population > 90) return; - if (t->goal[i] == TOWN_GROWTH_DESERT && GetTropicZone(t->xy) == TROPICZONE_DESERT && t->received[i].old_act == 0 && t->population > 60) return; - if (t->goal[i] > t->received[i].old_act) return; + if (t->fund_buildings_months == 0) { + /* Check if all goals are reached for this town to grow (given we are not funding it) */ + for (int i = TE_BEGIN; i < TE_END; i++) { + if (t->goal[i] == TOWN_GROWTH_WINTER && TileHeight(t->xy) >= GetSnowLine() && t->received[i].old_act == 0 && t->population > 90) return; + if (t->goal[i] == TOWN_GROWTH_DESERT && GetTropicZone(t->xy) == TROPICZONE_DESERT && t->received[i].old_act == 0 && t->population > 60) return; + if (t->goal[i] > t->received[i].old_act) return; + } } /** |