diff options
author | rubidium <rubidium@openttd.org> | 2011-11-27 11:42:52 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-27 11:42:52 +0000 |
commit | 04c40aa04d86b237c1987ff43e24b783f02b1e53 (patch) | |
tree | 89ecc950a6a0e6f87c05b5198fec2df7d950712b | |
parent | 251c7fbc8d260912855926b99cfd22520f9c578b (diff) | |
download | openttd-04c40aa04d86b237c1987ff43e24b783f02b1e53.tar.xz |
(svn r23342) -Fix (r23300): for arctic and desert towns you were required to deliver more than 4 billion units, instead of one or more units
-rw-r--r-- | src/town_cmd.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index a1d9cdf9e..9423b561c 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2778,9 +2778,17 @@ static void UpdateTownGrowRate(Town *t) 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; + switch (t->goal[i]) { + case TOWN_GROWTH_WINTER: + if (TileHeight(t->xy) >= GetSnowLine() && t->received[i].old_act == 0 && t->population > 90) return; + break; + case TOWN_GROWTH_DESERT: + if (GetTropicZone(t->xy) == TROPICZONE_DESERT && t->received[i].old_act == 0 && t->population > 60) return; + break; + default: + if (t->goal[i] > t->received[i].old_act) return; + break; + } } } |