(svn r20656) -Codechange: implement counting of objects

This commit is contained in:
rubidium
2010-08-28 18:23:14 +00:00
parent a4bb23b7ad
commit 63478d8533
4 changed files with 50 additions and 0 deletions

View File

@@ -1875,6 +1875,7 @@ bool AfterLoadGame()
o->build_date = _date;
o->town = type == OBJECT_STATUE ? Town::Get(_m[t].m2) : CalcClosestTownFromTile(t, UINT_MAX);
_m[t].m2 = o->index;
Object::IncTypeCount(type);
} else {
/* We're at an offset, so get the ID from our "root". */
TileIndex northern_tile = t - TileXY(GB(offset, 0, 4), GB(offset, 4, 4));