diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 4d55a56a6..a05987a27 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -298,6 +298,18 @@ void AfterLoadVehicles(bool part_of_load) } } + if (CheckSavegameVersion(105)) { + /* Before 105 there was no order for shared orders, thus it messed up horribly */ + FOR_ALL_VEHICLES(v) { + if (v->First() != v || v->orders.list != NULL || v->previous_shared != NULL || v->next_shared == NULL) continue; + + v->orders.list = new OrderList(NULL, v); + for (Vehicle *u = v; u != NULL; u = u->next_shared) { + u->orders.list = v->orders.list; + } + } + } + CheckValidVehicles(); FOR_ALL_VEHICLES(v) { |