(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
This commit is contained in:
@@ -253,8 +253,7 @@ static TileIndex FindRailStationEnd(TileIndex tile, TileIndexDiff delta, bool ch
|
||||
|
||||
if (waypoint) {
|
||||
if (!IsTileType(new_tile, MP_RAILWAY)) break;
|
||||
if (GetRailTileType(new_tile) != RAIL_TILE_DEPOT_WAYPOINT) break;
|
||||
if (GetRailTileSubtype(new_tile) != RAIL_SUBTYPE_WAYPOINT) break;
|
||||
if (!IsRailWaypoint(new_tile)) break;
|
||||
if (check_axis && GetWaypointAxis(new_tile) != orig_axis) break;
|
||||
} else {
|
||||
if (!IsRailwayStationTile(new_tile)) break;
|
||||
|
||||
Reference in New Issue
Block a user