From 37140f00384b0c1fef557fd7d91864aa0d63ec9b Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 1 Nov 2015 01:55:46 +0000 Subject: [PATCH] Fix distribution of shared order timetable start dates. (Ctrl-click on start date in timetable GUI) This is due to a scaling issue. --- src/timetable_cmd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 3fddfbe6ac..d3440fc281 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -313,7 +313,11 @@ CommandCost CmdSetTimetableStart(TileIndex tile, DoCommandFlag flags, uint32 p1, w->lateness_counter = 0; ClrBit(w->vehicle_flags, VF_TIMETABLE_STARTED); /* Do multiplication, then division to reduce rounding errors. */ +#if WALLCLOCK_NETWORK_COMPATIBLE w->timetable_start = start_date + idx * total_duration / num_vehs / DAY_TICKS; +#else + w->timetable_start = start_date + idx * total_duration / num_vehs; +#endif SetWindowDirty(WC_VEHICLE_TIMETABLE, w->index); }