(svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus)

This commit is contained in:
rubidium
2009-01-03 13:52:06 +00:00
parent fa2bf69a53
commit 0d54db5f9f
12 changed files with 535 additions and 231 deletions

View File

@@ -2386,7 +2386,10 @@ bool AfterLoadGame()
Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->orders != NULL && !v->orders->IsValid()) v->orders = NULL;
if (v->orders.list != NULL && v->orders.list->GetFirstOrder() != NULL && !v->orders.list->GetFirstOrder()->IsValid()) {
v->orders.list->FreeChain();
v->orders.list = NULL;
}
v->current_order.ConvertFromOldSavegame();
if (v->type == VEH_ROAD && v->IsPrimaryVehicle() && v->FirstShared() == v) {