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