(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
This commit is contained in:
@@ -43,14 +43,10 @@ RoadBits GetAnyRoadBits(TileIndex tile, RoadType rt)
|
||||
|
||||
TrackBits GetAnyRoadTrackBits(TileIndex tile, RoadType rt)
|
||||
{
|
||||
uint32 r;
|
||||
|
||||
/* Don't allow local authorities to build roads through road depots or road stops. */
|
||||
if (IsRoadDepotTile(tile) || (IsTileType(tile, MP_STATION) && !IsDriveThroughStopTile(tile)) || !HasTileRoadType(tile, rt)) {
|
||||
return TRACK_BIT_NONE;
|
||||
}
|
||||
|
||||
r = GetTileTrackStatus(tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(rt));
|
||||
|
||||
return (TrackBits)(byte)(r | (r >> 8));
|
||||
return TrackStatusToTrackBits(GetTileTrackStatus(tile, TRANSPORT_ROAD, RoadTypeToRoadTypes(rt)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user