mirror of https://github.com/OpenTTD/OpenTTD
Client settings different between clients so the resultant timings may be different.
Partially reverts 67a0fcc
.
vehicle-details-tooltip
parent
b87ce9c845
commit
5a7893b730
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue