Changeset - r23839:e7d54b77c054
[Not reviewed]
master
0 1 0
frosch - 5 years ago 2019-09-29 20:48:19
frosch@openttd.org
Fix fbbbc6e1931: Crash when creating orders to stations with relocated station sign. (#7755)

Station::xy is the position of the station sign, and not necessarily a tile of the station.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/order_gui.cpp
Show inline comments
 
@@ -410,8 +410,7 @@ static Order GetOrderCmdFromTile(const V
 
				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 && 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);
0 comments (0 inline, 0 general)