summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2014-05-01 14:49:16 +0000
committerfonsinchen <fonsinchen@openttd.org>2014-05-01 14:49:16 +0000
commit3ee31a8f893dbbedf89de9b3ecf44a71a48c6666 (patch)
treeee4d710aacfd15a4d76f1f0da1c22879fdb09126 /src/saveload
parentc915d9fa55e8bb42b33c56b94c5a5e0ff446d7da (diff)
downloadopenttd-3ee31a8f893dbbedf89de9b3ecf44a71a48c6666.tar.xz
(svn r26547) -Codechange: Collect order travel and wait times independent of timetables
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/order_sl.cpp4
-rw-r--r--src/saveload/saveload.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp
index 40f83f832..63701ffa0 100644
--- a/src/saveload/order_sl.cpp
+++ b/src/saveload/order_sl.cpp
@@ -186,6 +186,10 @@ static void Load_ORDR()
while ((index = SlIterateArray()) != -1) {
Order *order = new (index) Order();
SlObject(order, GetOrderDescription());
+ if (IsSavegameVersionBefore(190)) {
+ order->SetTravelTimetabled(order->GetTravelTime() > 0);
+ order->SetWaitTimetabled(order->GetWaitTime() > 0);
+ }
}
}
}
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 647423ada..a9c71c1e7 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -257,8 +257,9 @@
* 187 25899
* 188 26169 1.4.x
* 189 26450
+ * 190 ?????
*/
-extern const uint16 SAVEGAME_VERSION = 189; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 190; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading