Scheduled dispatch: Fixup start dates when changing game date

This commit is contained in:
Jonathan G Rennison
2020-06-20 21:27:19 +01:00
parent d160536315
commit ca79a32890
5 changed files with 15 additions and 0 deletions

View File

@@ -231,6 +231,7 @@ static void OnNewYear()
_date -= days_this_year;
for (Vehicle *v : Vehicle::Iterate()) v->date_of_last_service -= days_this_year;
for (LinkGraph *lg : LinkGraph::Iterate()) lg->ShiftDates(-days_this_year);
ShiftOrderDates(-days_this_year);
/* Because the _date wraps here, and text-messages expire by game-days, we have to clean out
* all of them if the date is set back, else those messages will hang for ever */