Mercurial > hg > openttd
changeset 3067:245d678e529f draft
(svn r3656) Simplify the overly complicated check for road pieces under a bridge
author | tron <tron@openttd.org> |
---|---|
date | Thu, 23 Feb 2006 07:31:36 +0000 |
parents | 4088b1ebe8ff |
children | 010d0d9b87cd |
files | road_cmd.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/road_cmd.c +++ b/road_cmd.c @@ -48,10 +48,10 @@ (~(_m[tile].m5 - 0x43) & 3) == i; case MP_TUNNELBRIDGE: - mask = GetRoadBitsByTile(tile); - b = 10; if (mask & 1) break; - b = 5; if (mask & 2) break; - return false; + // bail out, if not a bridge middle part with road underneath + if ((_m[tile].m5 & 0xF8) != 0xE8) return false; + // road direction perpendicular to bridge + b = (_m[tile].m5 & 0x01) ? 10 : 5; default: return false;