From 5a7893b7306f513c934d5f92c80766bf145199c2 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 26 Apr 2025 22:39:01 +0100 Subject: [PATCH] Fix #14104, 67a0fcc: Don't base timetable timing decisions on client settings. (#14105) Client settings different between clients so the resultant timings may be different. Partially reverts 67a0fcc. --- src/timetable_cmd.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 3dcff1f57c..48e11988b9 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -519,8 +519,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) /* Before modifying waiting times, check whether we want to preserve bigger ones. */ if (!real_current_order->IsType(OT_CONDITIONAL) && (travelling || time_taken > real_current_order->GetWaitTime() || remeasure_wait_time)) { - /* Round up to the unit currently shown in the GUI for days and seconds. - * Round up to seconds if currently used display style is ticks. + /* Round up to the smallest unit of time commonly shown in the GUI (seconds) to avoid confusion. * Players timetabling in Ticks can adjust later. * For trains/aircraft multiple movement cycles are done in one * tick. This makes it possible to leave the station and process @@ -528,8 +527,7 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) * the timetable entry like is done for road vehicles/ships. * Thus always make sure at least one tick is used between the * processing of different orders when filling the timetable. */ - uint factor = _settings_client.gui.timetable_mode == TimetableMode::Days ? Ticks::DAY_TICKS : Ticks::TICKS_PER_SECOND; - uint time_to_set = CeilDiv(std::max(time_taken, 1), factor) * factor; + uint time_to_set = CeilDiv(std::max(time_taken, 1), Ticks::TICKS_PER_SECOND) * Ticks::TICKS_PER_SECOND; if (travelling && (autofilling || !real_current_order->IsTravelTimetabled())) { ChangeTimetable(v, v->cur_real_order_index, time_to_set, MTF_TRAVEL_TIME, autofilling);