diff options
author | rubidium <rubidium@openttd.org> | 2010-05-11 11:55:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-05-11 11:55:12 +0000 |
commit | 38d60f4b47a5bc6dac0a3207f4fee7f895d5b6b9 (patch) | |
tree | 6643f04bdbe4665bcd3ccefcd7ad7f3d8ef3c64d /src | |
parent | 1cfddeeccf382988fc573ea2c62540f9557caacc (diff) | |
download | openttd-38d60f4b47a5bc6dac0a3207f4fee7f895d5b6b9.tar.xz |
(svn r19784) -Fix [FS#3770]: if a waypoint is immediately followed by a path signal a reservation would be made from that path signal before the waypoint is marked passed. As a result the order to go to the waypoint is used to reserve the path after the waypoint and as such trains get lost
Diffstat (limited to 'src')
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index f1260f7ff..a4fd35d80 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2122,6 +2122,8 @@ static void CheckNextTrainTile(Train *v) if ((v->tile == v->dest_tile && v->current_order.IsType(OT_GOTO_DEPOT)) || v->track == TRACK_BIT_DEPOT) return; /* Exit if we are on a station tile and are going to stop. */ if (IsRailStationTile(v->tile) && v->current_order.ShouldStopAtStation(v, GetStationIndex(v->tile))) return; + /* If we reached our waypoint, make sure we see that. */ + if (v->current_order.IsType(OT_GOTO_WAYPOINT) && IsRailWaypointTile(v->tile) && GetStationIndex(v->tile) == v->current_order.GetDestination()) ProcessOrders(v); /* Exit if the current order doesn't have a destination, but the train has orders. */ if ((v->current_order.IsType(OT_NOTHING) || v->current_order.IsType(OT_LEAVESTATION) || v->current_order.IsType(OT_LOADING)) && v->GetNumOrders() > 0) return; |