Mercurial > hg > openttd
diff src/openttd.cpp @ 10546:9ceef3c92be2 draft
(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)
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 03 Jan 2009 13:52:06 +0000 (2009-01-03) |
parents | 53a8506c2079 |
children | 315add01cf91 |
line wrap: on
line diff
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -2386,7 +2386,10 @@ 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) {