summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-01-14 23:33:42 +0000
committerPeterN <peter@fuzzle.org>2019-01-19 23:11:17 +0000
commit81330b8d6edee68c38717462737fbfca6420701d (patch)
treeed4e0e34930a5e6f28b5d275c27f6ccb50a2ba63 /src/saveload
parent1c725fce47d60907bbf2224c7bdc28607fcf6017 (diff)
downloadopenttd-81330b8d6edee68c38717462737fbfca6420701d.tar.xz
Change: Add path cache for ships.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp3
-rw-r--r--src/saveload/vehicle_sl.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index c60c8b6db..7f5b10ac5 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -272,8 +272,9 @@
* 200 #6805 Extend railtypes to 64, adding uint16 to map array.
* 201 #6885 Extend NewGRF persistant storages.
* 202 #6867 Increase industry cargo slots to 16 in, 16 out
+ * 203 #7072 Add path cache for ships
*/
-extern const uint16 SAVEGAME_VERSION = 202; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 203; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading
FileToSaveLoad _file_to_saveload; ///< File to save or load in the openttd loop.
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index bb3db3fe3..1e01f3f67 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -753,7 +753,8 @@ 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_VAR(Ship, state, SLE_UINT8),
+ SLE_CONDDEQUE(Ship, path, SLE_UINT8, 203, SL_MAX_VERSION),
SLE_CONDNULL(16, 2, 143), // old reserved space