tunnelbridge_cmd.c
changeset 4160 49ccad677eb7
parent 4158 a8f7265a6fd0
child 4172 5ca428e46357
--- a/tunnelbridge_cmd.c	Sat Jul 22 09:08:34 2006 +0000
+++ b/tunnelbridge_cmd.c	Sat Jul 22 14:31:56 2006 +0000
@@ -1234,16 +1234,9 @@
 {
 	switch (_opt.landscape) {
 		case LT_HILLY:
-			if (GetTileZ(tile) > _opt.snow_line) {
-				if (!(_m[tile].m4 & 0x80)) {
-					_m[tile].m4 |= 0x80;
-					MarkTileDirtyByTile(tile);
-				}
-			} else {
-				if (_m[tile].m4 & 0x80) {
-					_m[tile].m4 &= ~0x80;
-					MarkTileDirtyByTile(tile);
-				}
+			if (HASBIT(_m[tile].m4, 7) != (GetTileZ(tile) > _opt.snow_line)) {
+				TOGGLEBIT(_m[tile].m4, 7);
+				MarkTileDirtyByTile(tile);
 			}
 			break;