diff options
author | frosch <frosch@openttd.org> | 2008-12-20 00:16:23 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-12-20 00:16:23 +0000 |
commit | 6afd6a450fd29c164028dbd8337181c1cee8d0e2 (patch) | |
tree | 7ad6c901dc8bc9122e3bcb7548cd656a1dee3c66 /src | |
parent | fbc0e5edbec0df0984146fe3507fa0b9753d072f (diff) | |
download | openttd-6afd6a450fd29c164028dbd8337181c1cee8d0e2.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 3e81cd842..80ead8107 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -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 * problem with depot orders not part of the order list when the * 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(); } |