Changeset - r2230:6b7ed7f4e61f
[Not reviewed]
master
0 1 0
tron - 19 years ago 2005-07-29 18:22:04
tron@openttd.org
(svn r2750) -Fix: Tree tiles above the snow line got redrawn disproportionately often
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
tree_cmd.c
Show inline comments
 
@@ -421,13 +421,13 @@ static void TileLoopTreesAlps(TileIndex 
 
	byte tmp, m2;
 
	int k;
 

	
 
	/* distance from snow line, in steps of 8 */
 
	k = GetTileZ(tile) - _opt.snow_line;
 

	
 
	tmp = _m[tile].m5 & 0xF0;
 
	tmp = _m[tile].m2 & 0xF0;
 

	
 
	if (k < -8) {
 
		/* snow_m2_down */
 
		if ((tmp & 0x30) != 0x20) return;
 
		m2 = 0;
 
	} else if (k == -8) {
 
@@ -441,13 +441,13 @@ static void TileLoopTreesAlps(TileIndex 
 
	} else if (k == 8) {
 
		/* snow_p1 */
 
		m2 = 0xA0;
 
		if (tmp == m2) return;
 
	} else {
 
		/* snow_p2_up */
 
		if (tmp == 0xC0) {
 
		if (tmp == 0xE0) {
 
			uint32 r = Random();
 
			if (CHANCE16I(1,200,r)) {
 
				SndPlayTileFx((r & 0x80000000) ? SND_39_HEAVY_WIND : SND_34_WIND, tile);
 
			}
 
			return;
 
		} else {
0 comments (0 inline, 0 general)