Fix date cheat/scenario load not adjusting vehicle date of last service

This commit is contained in:
Jonathan G Rennison
2021-04-24 21:52:06 +01:00
parent ff35a783bf
commit e6a858c0dc
5 changed files with 13 additions and 1 deletions

View File

@@ -4204,3 +4204,10 @@ void DumpVehicleStats(char *buffer, const char *last)
buffer += seprintf(buffer, last, "\n");
}
}
void ShiftVehicleDates(int interval)
{
for (Vehicle *v : Vehicle::Iterate()) {
v->date_of_last_service += interval;
}
}