Mercurial > hg > openttd
changeset 4160:f0d7b63fb6b0 draft
(svn r5592) Merge two complementary cases
author | tron <tron@openttd.org> |
---|---|
date | Sat, 22 Jul 2006 14:31:56 +0000 |
parents | da28073983dd |
children | d21e037bdcb9 |
files | tunnelbridge_cmd.c |
diffstat | 1 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -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;