Codechange: move all date-related variables inside the timer (#10706)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include "strings_func.h"
|
||||
#include "command_func.h"
|
||||
#include "window_func.h"
|
||||
#include "date_func.h"
|
||||
#include "timer/timer_game_calendar.h"
|
||||
#include "vehicle_func.h"
|
||||
#include "sound_func.h"
|
||||
#include "cheat_type.h"
|
||||
@@ -337,8 +337,8 @@ CommandCost CmdBuildAircraft(DoCommandFlag flags, TileIndex tile, const Engine *
|
||||
|
||||
v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_aircraft);
|
||||
|
||||
v->date_of_last_service = _date;
|
||||
v->build_year = u->build_year = _cur_year;
|
||||
v->date_of_last_service = TimerGameCalendar::date;
|
||||
v->build_year = u->build_year = TimerGameCalendar::year;
|
||||
|
||||
v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
|
||||
u->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
|
||||
@@ -1555,7 +1555,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass *
|
||||
if (_settings_game.order.serviceathelipad) {
|
||||
if (v->subtype == AIR_HELICOPTER && apc->num_helipads > 0) {
|
||||
/* an excerpt of ServiceAircraft, without the invisibility stuff */
|
||||
v->date_of_last_service = _date;
|
||||
v->date_of_last_service = TimerGameCalendar::date;
|
||||
v->breakdowns_since_last_service = 0;
|
||||
v->reliability = v->GetEngine()->reliability;
|
||||
SetWindowDirty(WC_VEHICLE_DETAILS, v->index);
|
||||
|
Reference in New Issue
Block a user