1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 17:49:10 +00:00

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

@@ -16,7 +16,7 @@
#include "cargotype.h"
#include "strings_func.h"
#include "window_func.h"
#include "date_func.h"
#include "timer/timer_game_calendar.h"
#include "gfx_func.h"
#include "core/geometry_func.hpp"
#include "currency.h"
@@ -581,8 +581,8 @@ public:
nums = std::min(this->num_vert_lines, std::max(nums, c->num_valid_stat_ent));
}
int mo = (_cur_month / 3 - nums) * 3;
int yr = _cur_year;
int mo = (TimerGameCalendar::month / 3 - nums) * 3;
int yr = TimerGameCalendar::year;
while (mo < 0) {
yr--;
mo += 12;