From 81846cca24f76652d2d11bcc7d4e2566d4f61d03 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 22 Jul 2006 14:31:56 +0000 Subject: (svn r5592) Merge two complementary cases --- tunnelbridge_cmd.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'tunnelbridge_cmd.c') diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 708816304..8d7bc92fc 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -1234,16 +1234,9 @@ static void TileLoop_TunnelBridge(TileIndex tile) { 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; -- cgit v1.2.3-54-g00ecf