equal
deleted
inserted
replaced
22 case ROAD_TILE_DEPOT: return DiagDirToRoadBits(GetRoadDepotDirection(tile)); |
22 case ROAD_TILE_DEPOT: return DiagDirToRoadBits(GetRoadDepotDirection(tile)); |
23 } |
23 } |
24 |
24 |
25 case MP_STATION: |
25 case MP_STATION: |
26 if (!IsRoadStopTile(tile)) return ROAD_NONE; |
26 if (!IsRoadStopTile(tile)) return ROAD_NONE; |
|
27 if (IsDriveThroughStopTile(tile)) return (GetRoadStopDir(tile) == DIAGDIR_NE) ? ROAD_X : ROAD_Y; |
27 return DiagDirToRoadBits(GetRoadStopDir(tile)); |
28 return DiagDirToRoadBits(GetRoadStopDir(tile)); |
28 |
29 |
29 case MP_TUNNELBRIDGE: |
30 case MP_TUNNELBRIDGE: |
30 if (IsTunnel(tile)) { |
31 if (IsTunnel(tile)) { |
31 if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE; |
32 if (GetTunnelTransportType(tile) != TRANSPORT_ROAD) return ROAD_NONE; |
43 TrackBits GetAnyRoadTrackBits(TileIndex tile) |
44 TrackBits GetAnyRoadTrackBits(TileIndex tile) |
44 { |
45 { |
45 uint32 r; |
46 uint32 r; |
46 |
47 |
47 // Don't allow local authorities to build roads through road depots or road stops. |
48 // Don't allow local authorities to build roads through road depots or road stops. |
48 if ((IsTileType(tile, MP_STREET) && IsTileDepotType(tile, TRANSPORT_ROAD)) || IsTileType(tile, MP_STATION)) { |
49 if ((IsTileType(tile, MP_STREET) && IsTileDepotType(tile, TRANSPORT_ROAD)) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile))) { |
49 return TRACK_BIT_NONE; |
50 return TRACK_BIT_NONE; |
50 } |
51 } |
51 |
52 |
52 r = GetTileTrackStatus(tile, TRANSPORT_ROAD); |
53 r = GetTileTrackStatus(tile, TRANSPORT_ROAD); |
53 return (TrackBits)(byte)(r | (r >> 8)); |
54 return (TrackBits)(byte)(r | (r >> 8)); |