summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-02-14 17:24:55 +0000
committerrubidium <rubidium@openttd.org>2013-02-14 17:24:55 +0000
commitced17303c2a721560e31fb035fd331be4518e298 (patch)
tree81ff122d1c26d62c87e5fd3290abda9c8c6bffa0 /src/saveload
parent3d7860e0a5490b0f008a4abca024b94311593fc1 (diff)
downloadopenttd-ced17303c2a721560e31fb035fd331be4518e298.tar.xz
(svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138)
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/order_sl.cpp11
-rw-r--r--src/saveload/saveload.cpp3
-rw-r--r--src/saveload/vehicle_sl.cpp8
3 files changed, 13 insertions, 9 deletions
diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp
index 5b7fa535e..4d2a4b02e 100644
--- a/src/saveload/order_sl.cpp
+++ b/src/saveload/order_sl.cpp
@@ -251,11 +251,12 @@ const SaveLoad *GetOrderBackupDescription()
SLE_STR(OrderBackup, name, SLE_STR, 0),
SLE_VAR(OrderBackup, clone, SLE_UINT16),
SLE_VAR(OrderBackup, cur_real_order_index, SLE_UINT8),
- SLE_CONDVAR(OrderBackup, cur_implicit_order_index, SLE_UINT8, 176, SL_MAX_VERSION),
- SLE_CONDVAR(OrderBackup, current_order_time, SLE_UINT32, 176, SL_MAX_VERSION),
- SLE_CONDVAR(OrderBackup, lateness_counter, SLE_INT32, 176, SL_MAX_VERSION),
- SLE_CONDVAR(OrderBackup, timetable_start, SLE_INT32, 176, SL_MAX_VERSION),
- SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_UINT8, 176, SL_MAX_VERSION),
+ SLE_CONDVAR(OrderBackup, cur_implicit_order_index, SLE_UINT8, 176, SL_MAX_VERSION),
+ SLE_CONDVAR(OrderBackup, current_order_time, SLE_UINT32, 176, SL_MAX_VERSION),
+ SLE_CONDVAR(OrderBackup, lateness_counter, SLE_INT32, 176, SL_MAX_VERSION),
+ SLE_CONDVAR(OrderBackup, timetable_start, SLE_INT32, 176, SL_MAX_VERSION),
+ SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 176, 179),
+ SLE_CONDVAR(OrderBackup, vehicle_flags, SLE_UINT16, 180, SL_MAX_VERSION),
SLE_REF(OrderBackup, orders, REF_ORDER),
SLE_END()
};
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 7fa763a86..a21f6242a 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -243,8 +243,9 @@
* 177 24619
* 178 24789
* 179 24810
+ * 180 24998
*/
-extern const uint16 SAVEGAME_VERSION = 179; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 180; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp
index aebde2bb0..a33ceb6d3 100644
--- a/src/saveload/vehicle_sl.cpp
+++ b/src/saveload/vehicle_sl.cpp
@@ -655,8 +655,9 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_CONDVAR(Vehicle, max_age, SLE_INT32, 31, SL_MAX_VERSION),
SLE_CONDVAR(Vehicle, date_of_last_service, SLE_FILE_U16 | SLE_VAR_I32, 0, 30),
SLE_CONDVAR(Vehicle, date_of_last_service, SLE_INT32, 31, SL_MAX_VERSION),
- SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U16 | SLE_VAR_U32, 0, 30),
- SLE_CONDVAR(Vehicle, service_interval, SLE_UINT32, 31, SL_MAX_VERSION),
+ SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 0, 30),
+ SLE_CONDVAR(Vehicle, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 31, 179),
+ SLE_CONDVAR(Vehicle, service_interval, SLE_UINT16, 180, SL_MAX_VERSION),
SLE_VAR(Vehicle, reliability, SLE_UINT16),
SLE_VAR(Vehicle, reliability_spd_dec, SLE_UINT16),
SLE_VAR(Vehicle, breakdown_ctr, SLE_UINT8),
@@ -668,7 +669,8 @@ const SaveLoad *GetVehicleDescription(VehicleType vt)
SLE_VAR(Vehicle, load_unload_ticks, SLE_UINT16),
SLEG_CONDVAR( _cargo_paid_for, SLE_UINT16, 45, SL_MAX_VERSION),
- SLE_CONDVAR(Vehicle, vehicle_flags, SLE_UINT8, 40, SL_MAX_VERSION),
+ SLE_CONDVAR(Vehicle, vehicle_flags, SLE_FILE_U8 | SLE_VAR_U16, 40, 179),
+ SLE_CONDVAR(Vehicle, vehicle_flags, SLE_UINT16, 180, SL_MAX_VERSION),
SLE_CONDVAR(Vehicle, profit_this_year, SLE_FILE_I32 | SLE_VAR_I64, 0, 64),
SLE_CONDVAR(Vehicle, profit_this_year, SLE_INT64, 65, SL_MAX_VERSION),