diff options
Diffstat (limited to 'src/saveload/vehicle_sl.cpp')
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 1e01f3f67..76fd5af5a 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -368,6 +368,14 @@ void AfterLoadVehicles(bool part_of_load) v->SetServiceIntervalIsPercent(c->settings.vehicle.servint_ispercent); } } + + if (IsSavegameVersionBefore(204)) { + /* Ship rotation added */ + Ship *s; + FOR_ALL_SHIPS(s) { + s->rotation = s->direction; + } + } } CheckValidVehicles(); @@ -753,8 +761,9 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) static const SaveLoad _ship_desc[] = { SLE_WRITEBYTE(Vehicle, type, VEH_SHIP), SLE_VEH_INCLUDE(), - SLE_VAR(Ship, state, SLE_UINT8), - SLE_CONDDEQUE(Ship, path, SLE_UINT8, 203, SL_MAX_VERSION), + SLE_VAR(Ship, state, SLE_UINT8), + SLE_CONDDEQUE(Ship, path, SLE_UINT8, 203, SL_MAX_VERSION), + SLE_CONDVAR(Ship, rotation, SLE_UINT8, 204, SL_MAX_VERSION), SLE_CONDNULL(16, 2, 143), // old reserved space |