diff options
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/saveload.h | 1 | ||||
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 32 |
2 files changed, 18 insertions, 15 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index 331d62d7f..77cce4c4a 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -295,6 +295,7 @@ enum SaveLoadVersion : uint16 { SLV_SHIP_CURVE_PENALTY, ///< 209 PR#7289 Configurable ship curve penalties. SLV_SERVE_NEUTRAL_INDUSTRIES, ///< 210 PR#7234 Company stations can serve industries with attached neutral stations. + SLV_ROADVEH_PATH_CACHE, ///< 211 PR#7261 Add path cache for road vehicles. SL_MAX_VERSION, ///< Highest possible saveload version }; diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 540416586..058587139 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -752,21 +752,23 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) static const SaveLoad _roadveh_desc[] = { SLE_WRITEBYTE(Vehicle, type), SLE_VEH_INCLUDE(), - SLE_VAR(RoadVehicle, state, SLE_UINT8), - SLE_VAR(RoadVehicle, frame, SLE_UINT8), - SLE_VAR(RoadVehicle, blocked_ctr, SLE_UINT16), - SLE_VAR(RoadVehicle, overtaking, SLE_UINT8), - SLE_VAR(RoadVehicle, overtaking_ctr, SLE_UINT8), - SLE_VAR(RoadVehicle, crashed_ctr, SLE_UINT16), - SLE_VAR(RoadVehicle, reverse_ctr, SLE_UINT8), - - SLE_CONDNULL(2, SLV_6, SLV_69), - SLE_CONDVAR(RoadVehicle, gv_flags, SLE_UINT16, SLV_139, SL_MAX_VERSION), - SLE_CONDNULL(4, SLV_69, SLV_131), - SLE_CONDNULL(2, SLV_6, SLV_131), - SLE_CONDNULL(16, SLV_2, SLV_144), // old reserved space - - SLE_END() + SLE_VAR(RoadVehicle, state, SLE_UINT8), + SLE_VAR(RoadVehicle, frame, SLE_UINT8), + SLE_VAR(RoadVehicle, blocked_ctr, SLE_UINT16), + SLE_VAR(RoadVehicle, overtaking, SLE_UINT8), + SLE_VAR(RoadVehicle, overtaking_ctr, SLE_UINT8), + SLE_VAR(RoadVehicle, crashed_ctr, SLE_UINT16), + SLE_VAR(RoadVehicle, reverse_ctr, SLE_UINT8), + SLE_CONDDEQUE(RoadVehicle, path.td, SLE_UINT8, SLV_ROADVEH_PATH_CACHE, SL_MAX_VERSION), + SLE_CONDDEQUE(RoadVehicle, path.tile, SLE_UINT32, SLV_ROADVEH_PATH_CACHE, SL_MAX_VERSION), + + SLE_CONDNULL(2, SLV_6, SLV_69), + SLE_CONDVAR(RoadVehicle, gv_flags, SLE_UINT16, SLV_139, SL_MAX_VERSION), + SLE_CONDNULL(4, SLV_69, SLV_131), + SLE_CONDNULL(2, SLV_6, SLV_131), + SLE_CONDNULL(16, SLV_2, SLV_144), // old reserved space + + SLE_END() }; static const SaveLoad _ship_desc[] = { |