(svn r14280) -Codechange: use IsRailWaypointTile() instead of IsTileType() and IsRailWaypoint() checks at several places

This commit is contained in:
smatz
2008-09-09 12:26:25 +00:00
parent 80631f4a45
commit ff7e0b2586
6 changed files with 17 additions and 12 deletions

View File

@@ -318,10 +318,9 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
}
/* check waypoint */
if (IsTileType(tile, MP_RAILWAY) &&
if (IsRailWaypointTile(tile) &&
v->type == VEH_TRAIN &&
IsTileOwner(tile, _local_player) &&
IsRailWaypoint(tile)) {
IsTileOwner(tile, _local_player)) {
order.MakeGoToWaypoint(GetWaypointByTile(tile)->index);
if (_settings_client.gui.new_nonstop) order.SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
return order;