summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-06-25 23:14:13 +0000
committermaedhros <maedhros@openttd.org>2007-06-25 23:14:13 +0000
commitfb284a9264b96b591c963f741242d4d912a2cc45 (patch)
tree9a1114f3fc036e3b3e9e07878478310db7aadfff /src/train_cmd.cpp
parent217765fc0bdd036e1ded296fcbf77ab3c9f98f05 (diff)
downloadopenttd-fb284a9264b96b591c963f741242d4d912a2cc45.tar.xz
(svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 00a49fa6b..92a30bcbf 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -2380,8 +2380,8 @@ static bool ProcessTrainOrder(Vehicle *v)
if (!(v->current_order.flags & OF_PART_OF_ORDERS)) return false;
if ((v->current_order.flags & OF_SERVICE_IF_NEEDED) &&
!VehicleNeedsService(v)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
break;
@@ -2395,9 +2395,9 @@ static bool ProcessTrainOrder(Vehicle *v)
/* check if we've reached the waypoint? */
bool at_waypoint = false;
if (v->current_order.type == OT_GOTO_WAYPOINT && v->tile == v->dest_tile) {
+ UpdateVehicleTimetable(v, true);
v->cur_order_index++;
at_waypoint = true;
- UpdateVehicleTimetable(v, true);
}
/* check if we've reached a non-stop station while TTDPatch nonstop is enabled.. */
@@ -2405,8 +2405,8 @@ static bool ProcessTrainOrder(Vehicle *v)
v->current_order.flags & OF_NON_STOP &&
IsTileType(v->tile, MP_STATION) &&
v->current_order.dest == GetStationIndex(v->tile)) {
- v->cur_order_index++;
UpdateVehicleTimetable(v, true);
+ v->cur_order_index++;
}
/* Get the current order */