summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-07-14 21:01:49 +0000
committerrubidium <rubidium@openttd.org>2008-07-14 21:01:49 +0000
commit0f4d9a8e4928c8bd647734599b3eb8ec5720320a (patch)
treec04eab66f4437af132445671a76f32e893f6e47d /src/order_cmd.cpp
parent797ccc8b49fb0bbc80d7598731ba45eb138d9d8d (diff)
downloadopenttd-0f4d9a8e4928c8bd647734599b3eb8ec5720320a.tar.xz
(svn r13704) -Fix: make timetables work more sensible when used in conjunction with conditional orders, i.e. make it possibly to tell how long to travel to the next destination if you jump.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index b8bc5dd64..ac806225c 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1694,10 +1694,12 @@ static bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_dept
case OT_CONDITIONAL: {
VehicleOrderID next_order = ProcessConditionalOrder(order, v);
- UpdateVehicleTimetable(v, true);
if (next_order != INVALID_VEH_ORDER_ID) {
+ UpdateVehicleTimetable(v, false);
v->cur_order_index = next_order;
+ v->current_order_time += GetVehicleOrder(v, next_order)->travel_time;
} else {
+ UpdateVehicleTimetable(v, true);
v->cur_order_index++;
}