summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-30 10:26:16 +0000
committerrubidium <rubidium@openttd.org>2008-08-30 10:26:16 +0000
commitd40145008ee728c8c32cc3626809da0af17bafe9 (patch)
treeec70ac6801abacd1f11df0531e77976655e5330f /src
parentd3d34d2aac83bb6a3d53c5e05eb34f7057c6e0d1 (diff)
downloadopenttd-d40145008ee728c8c32cc3626809da0af17bafe9.tar.xz
(svn r14192) -Fix [FS#2236]: properly update the current timetable's travel/wait times instead of only doing it for one vehicle in the shared order chain and only when some bit has not been set (PhilSophus)
Diffstat (limited to 'src')
-rw-r--r--src/timetable_cmd.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp
index f0fea8530..0aa856ca9 100644
--- a/src/timetable_cmd.cpp
+++ b/src/timetable_cmd.cpp
@@ -24,15 +24,14 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time
order->wait_time = time;
}
- if (v->cur_order_index == order_number && v->current_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) {
- if (is_journey) {
- v->current_order.travel_time = time;
- } else {
- v->current_order.wait_time = time;
- }
- }
-
for (v = v->FirstShared(); v != NULL; v = v->NextShared()) {
+ if (v->cur_order_index == order_number && v->current_order.Equals(*order)) {
+ if (is_journey) {
+ v->current_order.travel_time = time;
+ } else {
+ v->current_order.wait_time = time;
+ }
+ }
InvalidateWindow(WC_VEHICLE_TIMETABLE, v->index);
}
}