summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-02 14:34:23 +0000
committersmatz <smatz@openttd.org>2008-06-02 14:34:23 +0000
commit2e8b9a70eced57cc5e0af5cabcc6b8bb510b8d41 (patch)
tree2d4dea4b3476df90956c1ceea956dcc3cfdcaf28 /src
parent014cb33bb9d0d4e2843b73281b42f9b88bbc1d09 (diff)
downloadopenttd-2e8b9a70eced57cc5e0af5cabcc6b8bb510b8d41.tar.xz
(svn r13362) -Fix: make the town authority window a bit less glitchy
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp4
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);
}
}