1
0
Fork 0

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.
pull/7760/head
frosch 2019-09-29 22:48:19 +02:00 committed by GitHub
parent 04f659e768
commit 041088d317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -410,8 +410,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 && 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);