(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles

This commit is contained in:
tron
2006-03-19 12:06:12 +00:00
parent ba53ec750a
commit 77e5cf4bc1
10 changed files with 66 additions and 63 deletions

View File

@@ -328,7 +328,8 @@ int32 CmdBuildBridge(int x, int y, uint32 flags, uint32 p1, uint32 p2)
break;
case MP_RAILWAY:
if (_m[tile].m5 != (direction == AXIS_X ? TRACK_BIT_Y : TRACK_BIT_X)) {
if (GetRailTileType(tile) != RAIL_TYPE_NORMAL ||
GetTrackBits(tile) != (direction == AXIS_X ? TRACK_BIT_Y : TRACK_BIT_X)) {
goto not_valid_below;
}
transport_under = TRANSPORT_RAIL;