mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r3656) Simplify the overly complicated check for road pieces under a bridge
This commit is contained in:
parent
ce71415584
commit
6f719ec50a
|
@ -48,10 +48,10 @@ static bool HasTileRoadAt(TileIndex tile, int i)
|
||||||
(~(_m[tile].m5 - 0x43) & 3) == i;
|
(~(_m[tile].m5 - 0x43) & 3) == i;
|
||||||
|
|
||||||
case MP_TUNNELBRIDGE:
|
case MP_TUNNELBRIDGE:
|
||||||
mask = GetRoadBitsByTile(tile);
|
// bail out, if not a bridge middle part with road underneath
|
||||||
b = 10; if (mask & 1) break;
|
if ((_m[tile].m5 & 0xF8) != 0xE8) return false;
|
||||||
b = 5; if (mask & 2) break;
|
// road direction perpendicular to bridge
|
||||||
return false;
|
b = (_m[tile].m5 & 0x01) ? 10 : 5;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue