From 49a77e89c425c37eb4c6bb4bf9e942bd75a48d57 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 13 Dec 2010 21:52:39 +0000 Subject: (svn r21504) -Codechange: move the "lost" bit from the train's flags to vehicle flags --- src/saveload/afterload.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/saveload') 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(); -- cgit v1.2.3-70-g09d2