Replace day length scaled tick macros with global variables.
This is to avoid needing to expensively re-calculate them all the time. Instead update them by incrementing.
This commit is contained in:
@@ -566,7 +566,7 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
|
||||
uint departure = 0;
|
||||
uint arrival = 0;
|
||||
|
||||
DateTicksScaled now_date = CURRENT_SCALED_TICKS;
|
||||
DateTicksScaled now_date = _scaled_date_ticks;
|
||||
DateTicksScaled max_date = now_date + (_settings_client.gui.max_departure_time * DAY_TICKS * _settings_game.economy.day_length_factor);
|
||||
|
||||
/* Draw each departure. */
|
||||
|
Reference in New Issue
Block a user