Changing day length or date no longer changes time in minutes
Add offset variables for scaled date ticks. Adjust offset when changing day length or date, such that scaled date ticks remain the same. Store _scaled_tick_counter and scaled date ticks offset in the savagame.
This commit is contained in:
@@ -241,7 +241,7 @@ DepartureList* MakeDepartureList(StationID station, const std::vector<const Vehi
|
||||
/* The maximum possible date for departures to be scheduled to occur. */
|
||||
DateTicksScaled max_date = _settings_client.gui.max_departure_time * DAY_TICKS * _settings_game.economy.day_length_factor;
|
||||
|
||||
DateTicksScaled date_only_scaled = ((DateTicksScaled)_date * DAY_TICKS * _settings_game.economy.day_length_factor);
|
||||
DateTicksScaled date_only_scaled = DateToScaledDateTicks(_date);
|
||||
DateTicksScaled date_fract_scaled = ((DateTicksScaled)_date_fract * _settings_game.economy.day_length_factor) + _tick_skip_counter;
|
||||
|
||||
/* The scheduled order in next_orders with the earliest expected_date field. */
|
||||
|
Reference in New Issue
Block a user