summaryrefslogtreecommitdiff
path: root/src/saveload/vehicle_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/vehicle_sl.cpp')
-rw-r--r--src/saveload/vehicle_sl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index f264c3d10..6b677fcf0 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -289,6 +289,12 @@ void AfterLoadVehicles(bool part_of_load)
}
}
}
+
+ /* In some old savegames there might be some "crap" stored. */
+ if (IsSavegameVersionBefore(160) && !v->IsPrimaryVehicle()) {
+ v->current_order.Free();
+ v->unitnumber = 0;
+ }
}
}