diff options
author | rubidium <rubidium@openttd.org> | 2009-04-12 14:11:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-12 14:11:14 +0000 |
commit | 5790293af6404ab5eb941ba9f67141631ecf621d (patch) | |
tree | 3db95c099e2a5c153a8ac783d99515c243755588 /src/saveload | |
parent | e85e8ca4dbd6344630c934acd6b69c487aba0236 (diff) | |
download | openttd-5790293af6404ab5eb941ba9f67141631ecf621d.tar.xz |
(svn r16037) -Feature: allow (per order) to let a train stop at the near end, middle or far end of a platform from the point of view of the driver of the train that enters the station.
Diffstat (limited to 'src/saveload')
-rw-r--r-- | src/saveload/afterload.cpp | 8 | ||||
-rw-r--r-- | src/saveload/order_sl.cpp | 2 | ||||
-rw-r--r-- | src/saveload/saveload.cpp | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 5f7cc1848..7dca7a53a 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -1797,6 +1797,14 @@ bool AfterLoadGame() } } + /* Trains could now stop in a specific location. */ + if (CheckSavegameVersion(117)) { + Order *o; + FOR_ALL_ORDERS(o) { + if (o->IsType(OT_GOTO_STATION)) o->SetStopLocation(OSL_PLATFORM_FAR_END); + } + } + AfterLoadLabelMaps(); GamelogPrintDebug(1); diff --git a/src/saveload/order_sl.cpp b/src/saveload/order_sl.cpp index 0ec506f1d..8579746ce 100644 --- a/src/saveload/order_sl.cpp +++ b/src/saveload/order_sl.cpp @@ -39,6 +39,8 @@ void Order::ConvertFromOldSavegame() this->SetLoadType(_settings_client.gui.sg_full_load_any || CheckSavegameVersion(22) ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD); } + if (this->IsType(OT_GOTO_STATION)) this->SetStopLocation(OSL_PLATFORM_FAR_END); + /* Finally fix the unload flags */ if ((old_flags & 1) != 0) { // OFB_TRANSFER this->SetUnloadType(OUFB_TRANSFER); diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 13c437746..a8368ba4d 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -40,7 +40,7 @@ #include "saveload_internal.h" -extern const uint16 SAVEGAME_VERSION = 116; +extern const uint16 SAVEGAME_VERSION = 117; SavegameType _savegame_type; ///< type of savegame we are loading |