From fc5df15b777f7f232d7ab16ec460036eceb4a1a0 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 21 Sep 2019 11:39:42 +0100 Subject: [PATCH] Fix fbbbc6e1931: Assumption that Station::xy is a station tile --- src/order_gui.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 126e78522f..a1b62ee6a7 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -1004,8 +1004,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile) default: NOT_REACHED(); } if (st->facilities & facil) { - StationID st_index = GetStationIndex(st->xy); - order.MakeGoToStation(st_index); + order.MakeGoToStation(st->index); if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY); if ((_settings_client.gui.new_nonstop || _settings_game.order.nonstop_only) && v->IsGroundVehicle()) order.SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS); order.SetStopLocation(v->type == VEH_TRAIN ? (OrderStopLocation)(_settings_client.gui.stop_location) : OSL_PLATFORM_FAR_END);