mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 17:39:09 +00:00
(svn r14699) -Fix (r14483): Do not use v->dest_tile for trains heading to a station. Reaching that tile does not mean reaching the station.
This commit is contained in:
@@ -2936,7 +2936,10 @@ static Track ChooseTrainTrack(Vehicle* v, TileIndex tile, DiagDirection enterdir
|
|||||||
* for a path and no look-ahead is necessary. This also avoids a
|
* for a path and no look-ahead is necessary. This also avoids a
|
||||||
* problem with depot orders not part of the order list when the
|
* problem with depot orders not part of the order list when the
|
||||||
* order list itself is empty. */
|
* order list itself is empty. */
|
||||||
if (!v->current_order.IsType(OT_GOTO_DEPOT) && (v->tile == v->dest_tile || (v->current_order.IsType(OT_GOTO_STATION) && IsRailwayStationTile(v->tile) && v->current_order.GetDestination() == GetStationIndex(v->tile)))) {
|
if (!v->current_order.IsType(OT_GOTO_DEPOT) && (
|
||||||
|
v->current_order.IsType(OT_GOTO_STATION) ?
|
||||||
|
IsRailwayStationTile(v->tile) && v->current_order.GetDestination() == GetStationIndex(v->tile) :
|
||||||
|
v->tile == v->dest_tile)) {
|
||||||
orders.SwitchToNextOrder();
|
orders.SwitchToNextOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user