mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-19 03:29:26 +01:00
Merge 797f2e15ba
into 9238f508eb
This commit is contained in:
commit
7ed9708cdd
@ -456,6 +456,9 @@ void Aircraft::OnNewCalendarDay()
|
||||
void Aircraft::OnNewEconomyDay()
|
||||
{
|
||||
if (!this->IsNormalAircraft()) return;
|
||||
|
||||
PerformanceAccumulator framerate(PFE_GL_AIRCRAFT);
|
||||
|
||||
EconomyAgeVehicle(this);
|
||||
|
||||
if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
|
||||
|
@ -1696,6 +1696,9 @@ void RoadVehicle::OnNewCalendarDay()
|
||||
void RoadVehicle::OnNewEconomyDay()
|
||||
{
|
||||
if (!this->IsFrontEngine()) return;
|
||||
|
||||
PerformanceAccumulator framerate(PFE_GL_ROADVEHS);
|
||||
|
||||
EconomyAgeVehicle(this);
|
||||
|
||||
if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
|
||||
|
@ -260,6 +260,8 @@ void Ship::OnNewCalendarDay()
|
||||
/** Economy day handler. */
|
||||
void Ship::OnNewEconomyDay()
|
||||
{
|
||||
PerformanceAccumulator framerate(PFE_GL_SHIPS);
|
||||
|
||||
EconomyAgeVehicle(this);
|
||||
|
||||
if ((++this->day_counter & 7) == 0) {
|
||||
|
@ -4176,6 +4176,8 @@ void Train::OnNewCalendarDay()
|
||||
/** Economy day handler. */
|
||||
void Train::OnNewEconomyDay()
|
||||
{
|
||||
PerformanceAccumulator framerate(PFE_GL_TRAINS);
|
||||
|
||||
EconomyAgeVehicle(this);
|
||||
|
||||
if ((++this->day_counter & 7) == 0) DecreaseVehicleValue(this);
|
||||
|
@ -955,16 +955,17 @@ void CallVehicleTicks()
|
||||
{
|
||||
_vehicles_to_autoreplace.clear();
|
||||
|
||||
PerformanceAccumulator::Reset(PFE_GL_TRAINS);
|
||||
PerformanceAccumulator::Reset(PFE_GL_ROADVEHS);
|
||||
PerformanceAccumulator::Reset(PFE_GL_SHIPS);
|
||||
PerformanceAccumulator::Reset(PFE_GL_AIRCRAFT);
|
||||
|
||||
RunEconomyVehicleDayProc();
|
||||
|
||||
{
|
||||
PerformanceMeasurer framerate(PFE_GL_ECONOMY);
|
||||
for (Station *st : Station::Iterate()) LoadUnloadStation(st);
|
||||
}
|
||||
PerformanceAccumulator::Reset(PFE_GL_TRAINS);
|
||||
PerformanceAccumulator::Reset(PFE_GL_ROADVEHS);
|
||||
PerformanceAccumulator::Reset(PFE_GL_SHIPS);
|
||||
PerformanceAccumulator::Reset(PFE_GL_AIRCRAFT);
|
||||
|
||||
for (Vehicle *v : Vehicle::Iterate()) {
|
||||
[[maybe_unused]] VehicleID vehicle_index = v->index;
|
||||
|
Loading…
Reference in New Issue
Block a user