From c5a6a4458bcfb693e90f94b6d14d221229e90487 Mon Sep 17 00:00:00 2001 From: truelight Date: Thu, 8 Mar 2007 14:34:32 +0000 Subject: (svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it --- src/openttd.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/openttd.cpp') 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 @@ -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; } -- cgit v1.2.3-54-g00ecf