Fix distribution of shared order timetable start dates.

(Ctrl-click on start date in timetable GUI)
This is due to a scaling issue.

(cherry picked from commit 37140f0038)
pull/6/merge
Jonathan G Rennison 9 years ago
parent 64f408dd32
commit b24f540ac4

@ -323,7 +323,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);
}

Loading…
Cancel
Save