Fix: Update last servicing dates when using the date cheat (#9694)

This commit is contained in:
nchappe
2021-11-19 00:04:22 +00:00
committed by GitHub
parent 0533b666b7
commit 2cb6351af5
4 changed files with 15 additions and 1 deletions

View File

@@ -763,6 +763,16 @@ uint32 Vehicle::GetGRFID() const
return this->GetEngine()->GetGRFID();
}
/**
* Shift all dates by given interval.
* This is useful if the date has been modified with the cheat menu.
* @param interval Number of days to be added or substracted.
*/
void Vehicle::ShiftDates(int interval)
{
this->date_of_last_service += interval;
}
/**
* Handle the pathfinding result, especially the lost status.
* If the vehicle is now lost and wasn't previously fire an