Codechange: move all date-related variables inside the timer (#10706)

This commit is contained in:
Patric Stout
2023-04-24 17:56:01 +02:00
committed by GitHub
parent f5f6306af3
commit 7aa2b9ab0a
76 changed files with 308 additions and 301 deletions

View File

@@ -1149,8 +1149,8 @@ void SetStartingYear(Year year)
_settings_game.game_creation.starting_year = Clamp(year, MIN_YEAR, MAX_YEAR);
Date new_date = ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1);
/* If you open a savegame as scenario there may already be link graphs.*/
LinkGraphSchedule::instance.ShiftDates(new_date - _date);
SetDate(new_date, 0);
LinkGraphSchedule::instance.ShiftDates(new_date - TimerGameCalendar::date);
TimerGameCalendar::SetDate(new_date, 0);
}
/**