summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-10 14:33:07 +0000
committerrubidium <rubidium@openttd.org>2009-09-10 14:33:07 +0000
commit55ddce8da2b6993fa1228a8935526d40fc44de46 (patch)
tree02f1f3836fd9c76b19b741a772d0efb29c528d7b /src/saveload
parentbb94724a092750794e8c2ad1a6537fac6b902b9e (diff)
downloadopenttd-55ddce8da2b6993fa1228a8935526d40fc44de46.tar.xz
(svn r17493) -Codechange: store the depot index on the map
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 4a122d005..b1d2625d5 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -13,6 +13,7 @@
#include "../void_map.h"
#include "../signs_base.h"
#include "../roadstop_base.h"
+#include "../depot_base.h"
#include "../window_func.h"
#include "../fios.h"
#include "../train.h"
@@ -1951,6 +1952,14 @@ bool AfterLoadGame()
FOR_ALL_STATIONS(st) UpdateStationAcceptance(st, false);
}
+ if (CheckSavegameVersion(128)) {
+ const Depot *d;
+ FOR_ALL_DEPOTS(d) {
+ _m[d->xy].m2 = d->index;
+ if (IsTileType(d->xy, MP_WATER)) _m[GetOtherShipDepotTile(d->xy)].m2 = d->index;
+ }
+ }
+
AfterLoadLabelMaps();
GamelogPrintDebug(1);