summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-03-08 14:34:32 +0000
committertruelight <truelight@openttd.org>2007-03-08 14:34:32 +0000
commitc5a6a4458bcfb693e90f94b6d14d221229e90487 (patch)
tree74204bca3b25f96b90b1b1a8de5dfed13c92a61b /src/openttd.cpp
parent4ca294dfffa7e7caa4d2e31a249f681328b649c7 (diff)
downloadopenttd-c5a6a4458bcfb693e90f94b6d14d221229e90487.tar.xz
(svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 01de0e3cd..b212d318e 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -64,6 +64,7 @@
#include "road_map.h"
#include "water_map.h"
#include "industry_map.h"
+#include "unmovable_map.h"
#include <stdarg.h>
@@ -1835,6 +1836,14 @@ bool AfterLoadGame()
if (CheckSavegameVersion(49)) FOR_ALL_PLAYERS(p) p->face = ConvertFromOldPlayerFace(p->face);
+ if (CheckSavegameVersion(52)) {
+ for (TileIndex t = 0; t < map_size; t++) {
+ if (IsStatueTile(t)) {
+ _m[t].m2 = CalcClosestTownFromTile(t, (uint)-1)->index;
+ }
+ }
+ }
+
return true;
}