summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 9b840ffbf..32c4abd51 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -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;