Codechange: move all date-related variables inside the timer (#10706)
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include "framerate_type.h"
|
||||
#include "train_cmd.h"
|
||||
#include "misc_cmd.h"
|
||||
#include "timer/timer_game_calendar.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
#include "table/train_sprites.h"
|
||||
@@ -651,8 +652,8 @@ static CommandCost CmdBuildRailWagon(DoCommandFlag flags, TileIndex tile, const
|
||||
|
||||
v->railtype = rvi->railtype;
|
||||
|
||||
v->date_of_last_service = _date;
|
||||
v->build_year = _cur_year;
|
||||
v->date_of_last_service = TimerGameCalendar::date;
|
||||
v->build_year = TimerGameCalendar::year;
|
||||
v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
|
||||
v->random_bits = VehicleRandomBits();
|
||||
|
||||
@@ -781,8 +782,8 @@ CommandCost CmdBuildRailVehicle(DoCommandFlag flags, TileIndex tile, const Engin
|
||||
v->railtype = rvi->railtype;
|
||||
|
||||
v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_trains);
|
||||
v->date_of_last_service = _date;
|
||||
v->build_year = _cur_year;
|
||||
v->date_of_last_service = TimerGameCalendar::date;
|
||||
v->build_year = TimerGameCalendar::year;
|
||||
v->sprite_cache.sprite_seq.Set(SPR_IMG_QUERY);
|
||||
v->random_bits = VehicleRandomBits();
|
||||
|
||||
|
Reference in New Issue
Block a user