diff options
author | rubidium <rubidium@openttd.org> | 2013-05-19 14:22:04 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-05-19 14:22:04 +0000 |
commit | 39474532777a1f7beadfd940abf29292bc39879a (patch) | |
tree | 59165ada9556ce5b154ec31cbb994827e7e90fe6 /src/saveload | |
parent | 0cc3d8df4b79628c702ba1293cdc00c099dd0b60 (diff) | |
download | openttd-39474532777a1f7beadfd940abf29292bc39879a.tar.xz |
(svn r25259) -Codechange: track capacities and usage of links
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 1 | ||||
-rw-r--r-- | src/saveload/saveload.cpp | 1 | ||||
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index 8cc670d23..987af757a 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -1252,6 +1252,7 @@ bool LoadOldVehicle(LoadgameState *ls, int num) if (!LoadChunk(ls, v, vehicle_chunk)) return false; if (v == NULL) continue; + v->refit_cap = v->cargo_cap; SpriteID sprite = v->cur_image; /* no need to override other sprites */ diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 61ab52656..8b0ee1109 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -246,6 +246,7 @@ * 179 24810 * 180 24998 1.3.x * 181 25012 + * 182 25259 */ extern const uint16 SAVEGAME_VERSION = 181; ///< Current savegame version of OpenTTD. diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index bc1edebb8..3ee6ce99c 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -604,6 +604,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLE_VAR(Vehicle, vehstatus, SLE_UINT8), SLE_CONDVAR(Vehicle, last_station_visited, SLE_FILE_U8 | SLE_VAR_U16, 0, 4), SLE_CONDVAR(Vehicle, last_station_visited, SLE_UINT16, 5, SL_MAX_VERSION), + SLE_CONDVAR(Vehicle, last_loading_station, SLE_UINT16, 182, SL_MAX_VERSION), SLE_VAR(Vehicle, cargo_type, SLE_UINT8), SLE_CONDVAR(Vehicle, cargo_subtype, SLE_UINT8, 35, SL_MAX_VERSION), @@ -612,6 +613,7 @@ const SaveLoad *GetVehicleDescription(VehicleType vt) SLEG_CONDVAR( _cargo_source, SLE_UINT16, 7, 67), SLEG_CONDVAR( _cargo_source_xy, SLE_UINT32, 44, 67), SLE_VAR(Vehicle, cargo_cap, SLE_UINT16), + SLE_CONDVAR(Vehicle, refit_cap, SLE_UINT16, 182, SL_MAX_VERSION), SLEG_CONDVAR( _cargo_count, SLE_UINT16, 0, 67), SLE_CONDLST(Vehicle, cargo.packets, REF_CARGO_PACKET, 68, SL_MAX_VERSION), SLE_CONDARR(Vehicle, cargo.action_counts, SLE_UINT, VehicleCargoList::NUM_MOVE_TO_ACTION, 181, SL_MAX_VERSION), @@ -903,6 +905,8 @@ void Load_VEHS() v->last_station_visited = INVALID_STATION; } + if (IsSavegameVersionBefore(182)) v->last_loading_station = INVALID_STATION; + if (IsSavegameVersionBefore(5)) { /* Convert the current_order.type (which is a mix of type and flags, because * in those versions, they both were 4 bits big) to type and flags */ |