forked from mirror/OpenTTD
(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:
@@ -200,8 +200,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
|
||||
switch (GetTileType(tile)) {
|
||||
case MP_RAILWAY:
|
||||
if (v->type == VEH_Train && IsTileOwner(tile, _local_player)) {
|
||||
if (GetRailTileType(tile) == RAIL_TILE_DEPOT_WAYPOINT &&
|
||||
GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) {
|
||||
if (IsRailDepot(tile)) {
|
||||
order.type = OT_GOTO_DEPOT;
|
||||
order.flags = OF_PART_OF_ORDERS;
|
||||
order.station = GetDepotByTile(tile)->index;
|
||||
|
Reference in New Issue
Block a user