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

@@ -11,6 +11,7 @@
#include "crashlog.h"
#include "gamelog.h"
#include "date_func.h"
#include "timer/timer_game_calendar.h"
#include "map_func.h"
#include "rev.h"
#include "strings_func.h"
@@ -357,8 +358,8 @@ char *CrashLog::FillCrashLog(char *buffer, const char *last) const
buffer += UTCTime::Format(buffer, last, "Crash at: %Y-%m-%d %H:%M:%S (UTC)\n");
YearMonthDay ymd;
ConvertDateToYMD(_date, &ymd);
buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i)\n\n", ymd.year, ymd.month + 1, ymd.day, _date_fract);
ConvertDateToYMD(TimerGameCalendar::date, &ymd);
buffer += seprintf(buffer, last, "In game date: %i-%02i-%02i (%i)\n\n", ymd.year, ymd.month + 1, ymd.day, TimerGameCalendar::date_fract);
buffer = this->LogError(buffer, last, CrashLog::message.c_str());
buffer = this->LogOpenTTDVersion(buffer, last);