Changeset - r9444:d316ad6ba50f
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-06-02 14:34:23
smatz@openttd.org
(svn r13362) -Fix: make the town authority window a bit less glitchy
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -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, 
 
		_town_test_ratings[t] = rating;
 
	} else {
 
		t->ratings[_current_player] = rating;
 
		InvalidateWindow(WC_TOWN_AUTHORITY, t->index);
 
	}
 
}
 

	
0 comments (0 inline, 0 general)