summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-05-25 19:29:24 +0000
committersmatz <smatz@openttd.org>2008-05-25 19:29:24 +0000
commitf9e7fa4c886029a5da84b35b0f168395088c877b (patch)
treef3069d62cd04b0a8e15e7f395ae66fcfce8e99fa
parent4625695653c3c0be16b61b640c206c557af9ec7b (diff)
downloadopenttd-f9e7fa4c886029a5da84b35b0f168395088c877b.tar.xz
(svn r13252) -Fix: when converting orders from older savegames, set 'Unload and leave empty' for 'Unload' orders
-rw-r--r--src/order_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 77207ce3b..3e1f53f07 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -168,7 +168,9 @@ void Order::ConvertFromOldSavegame()
/* Then the load/depot action flags because those bits are going to be reused too
* and they reuse the non-stop bits. */
if (this->GetType() != OT_GOTO_DEPOT) {
- if ((this->flags & 4) == 0) {
+ if ((this->flags & 2) != 0) {
+ this->SetLoadType(OLFB_NO_LOAD);
+ } else if ((this->flags & 4) == 0) {
this->SetLoadType(OLF_LOAD_IF_POSSIBLE);
} else {
this->SetLoadType(_settings.gui.sg_full_load_any ? OLF_FULL_LOAD_ANY : OLFB_FULL_LOAD);