Fix f6dd505: Missing savegame conversion for current_order (#12188)

This commit is contained in:
Loïc Guilloux 2024-02-27 21:25:49 +01:00 committed by GitHub
parent d4f0f0e2c5
commit fad77261ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -1771,6 +1771,11 @@ bool AfterLoadGame()
if (!order->IsType(OT_GOTO_DEPOT)) continue;
order->SetDepotActionType((OrderDepotActionFlags)(order->GetDepotActionType() >> 1));
}
for (Vehicle *v : Vehicle::Iterate()) {
if (!v->current_order.IsType(OT_GOTO_DEPOT)) continue;
v->current_order.SetDepotActionType((OrderDepotActionFlags)(v->current_order.GetDepotActionType() >> 1));
}
}
/* The water class was moved/unified. */