summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-13 21:52:39 +0000
committerrubidium <rubidium@openttd.org>2010-12-13 21:52:39 +0000
commit49a77e89c425c37eb4c6bb4bf9e942bd75a48d57 (patch)
treeeebb3a1f7f349404435949a411fb4072e4914da9 /src/saveload
parenta2b50b05c14a27ecbd63026b17b87582bc955305 (diff)
downloadopenttd-49a77e89c425c37eb4c6bb4bf9e942bd75a48d57.tar.xz
(svn r21504) -Codechange: move the "lost" bit from the train's flags to vehicle flags
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 6e95f5a90..4bd466e1e 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -2392,6 +2392,17 @@ bool AfterLoadGame()
}
}
+ if (IsSavegameVersionBefore(156)) {
+ /* The train's pathfinder lost flag got moved. */
+ Train *t;
+ FOR_ALL_TRAINS(t) {
+ if (!HasBit(t->flags, 5)) continue;
+
+ ClrBit(t->flags, 5);
+ SetBit(t->vehicle_flags, VF_PATHFINDER_LOST);
+ }
+ }
+
/* Road stops is 'only' updating some caches */
AfterLoadRoadStops();
AfterLoadLabelMaps();