summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-07-22 14:31:56 +0000
committertron <tron@openttd.org>2006-07-22 14:31:56 +0000
commit81846cca24f76652d2d11bcc7d4e2566d4f61d03 (patch)
tree4d07c899ada90d584490f3165057d389f13ff986
parent611ca20f683cc9616d79d0e2a1ec3afe32208f09 (diff)
downloadopenttd-81846cca24f76652d2d11bcc7d4e2566d4f61d03.tar.xz
(svn r5592) Merge two complementary cases
-rw-r--r--tunnelbridge_cmd.c13
1 files changed, 3 insertions, 10 deletions
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;