summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-03-10 06:53:00 +0000
committerpeter1138 <peter1138@openttd.org>2009-03-10 06:53:00 +0000
commit0564d52d990bda72c6e63d16ce20e6f9572abcf1 (patch)
treea98704bdbabfbc7197b9fddf663d0aa5aaa9e5f2 /src
parent62e2de5822248e08adf56924c679ac787dc28408 (diff)
downloadopenttd-0564d52d990bda72c6e63d16ce20e6f9572abcf1.tar.xz
(svn r15662) -Fix (r11795): Don't mark a company as having ratings in a town when querying the cost of a command.
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index a73af923c..c8cdf6af4 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2651,8 +2651,6 @@ void ChangeTownRating(Town *t, int add, int max, DoCommandFlag flags)
return;
}
- SetBit(t->have_ratings, _current_company);
-
int rating = GetRating(t);
if (add < 0) {
if (rating > max) {
@@ -2668,6 +2666,7 @@ void ChangeTownRating(Town *t, int add, int max, DoCommandFlag flags)
if (_town_rating_test) {
_town_test_ratings[t] = rating;
} else {
+ SetBit(t->have_ratings, _current_company);
t->ratings[_current_company] = rating;
InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
}