diff options
author | smatz <smatz@openttd.org> | 2008-06-02 14:34:23 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-02 14:34:23 +0000 |
commit | 2e8b9a70eced57cc5e0af5cabcc6b8bb510b8d41 (patch) | |
tree | 2d4dea4b3476df90956c1ceea956dcc3cfdcaf28 | |
parent | 014cb33bb9d0d4e2843b73281b42f9b88bbc1d09 (diff) | |
download | openttd-2e8b9a70eced57cc5e0af5cabcc6b8bb510b8d41.tar.xz |
(svn r13362) -Fix: make the town authority window a bit less glitchy
-rw-r--r-- | src/town_cmd.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index c3dc04842..a140f62f8 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -2243,6 +2243,7 @@ static void TownActionBribe(Town *t) */ if (t->ratings[_current_player] > RATING_BRIBE_DOWN_TO) { t->ratings[_current_player] = RATING_BRIBE_DOWN_TO; + InvalidateWindow(WC_TOWN_AUTHORITY, t->index); } } else { ChangeTownRating(t, RATING_BRIBE_UP_STEP, RATING_BRIBE_MAXIMUM); @@ -2324,6 +2325,8 @@ static void UpdateTownGrowRate(Town *t) t->ratings[i] = Clamp(t->ratings[i], RATING_MINIMUM, RATING_MAXIMUM); } + InvalidateWindow(WC_TOWN_AUTHORITY, t->index); + ClrBit(t->flags12, TOWN_IS_FUNDED); if (_settings_game.economy.town_growth_rate == 0 && t->fund_buildings_months == 0) return; @@ -2495,6 +2498,7 @@ void ChangeTownRating(Town *t, int add, int max) _town_test_ratings[t] = rating; } else { t->ratings[_current_player] = rating; + InvalidateWindow(WC_TOWN_AUTHORITY, t->index); } } |