(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:
tron
2006-07-27 05:30:53 +00:00
parent d6f6f76a7c
commit 3c368fc05e
6 changed files with 34 additions and 35 deletions

View File

@@ -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;