forked from mirror/OpenTTD
(svn r15662) -Fix (r11795): Don't mark a company as having ratings in a town when querying the cost of a command.
This commit is contained in:
@@ -2651,8 +2651,6 @@ void ChangeTownRating(Town *t, int add, int max, DoCommandFlag flags)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetBit(t->have_ratings, _current_company);
|
|
||||||
|
|
||||||
int rating = GetRating(t);
|
int rating = GetRating(t);
|
||||||
if (add < 0) {
|
if (add < 0) {
|
||||||
if (rating > max) {
|
if (rating > max) {
|
||||||
@@ -2668,6 +2666,7 @@ void ChangeTownRating(Town *t, int add, int max, DoCommandFlag flags)
|
|||||||
if (_town_rating_test) {
|
if (_town_rating_test) {
|
||||||
_town_test_ratings[t] = rating;
|
_town_test_ratings[t] = rating;
|
||||||
} else {
|
} else {
|
||||||
|
SetBit(t->have_ratings, _current_company);
|
||||||
t->ratings[_current_company] = rating;
|
t->ratings[_current_company] = rating;
|
||||||
InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
|
InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user