diff options
author | rubidium <rubidium@openttd.org> | 2009-01-03 13:52:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-03 13:52:06 +0000 |
commit | 0d54db5f9fb3a3987f908645ca9693684f34674b (patch) | |
tree | d7251708eeba7b26d032505b22c0bb570da26501 /src/timetable_cmd.cpp | |
parent | fa2bf69a5384a8035a92a069f47f31a178bc3f3c (diff) | |
download | openttd-0d54db5f9fb3a3987f908645ca9693684f34674b.tar.xz |
(svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus)
Diffstat (limited to 'src/timetable_cmd.cpp')
-rw-r--r-- | src/timetable_cmd.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index c45af9d5e..5364dd953 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -17,12 +17,16 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time, bool is_journey) { Order *order = GetVehicleOrder(v, order_number); + int delta; if (is_journey) { + delta = time - order->travel_time; order->travel_time = time; } else { + delta = time - order->wait_time; order->wait_time = time; } + v->orders.list->UpdateOrderTimetable(delta); for (v = v->FirstShared(); v != NULL; v = v->NextShared()) { if (v->cur_order_index == order_number && v->current_order.Equals(*order)) { |