(svn r9066) -Fix [FS#638]: store the owner of a statue, so when it gets removed, the town is notified of it

This commit is contained in:
truelight
2007-03-08 14:34:32 +00:00
parent c517f8fd6e
commit 7b153e6356
5 changed files with 41 additions and 8 deletions

View File

@@ -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;
}