(svn r12381) -Fix [FS1835] [FS1535] (r11855): The number of houses wasn't computed right. A few other things regaring the updating had to be changed. Big thanks for support to frosch123 and SmatZ, to name just a few. (Inspired by a patch of bilbo)

This commit is contained in:
skidd13
2008-03-18 12:28:21 +00:00
parent 285a43037b
commit 49cf499cf2
8 changed files with 50 additions and 31 deletions

View File

@@ -1348,9 +1348,9 @@ bool AfterLoadGame()
if (CheckSavegameVersionOldStyle(6, 1)) UpdateSignOwner();
/* In old version there seems to be a problem that water is owned by
OWNER_NONE, not OWNER_WATER.. I can't replicate it for the current
(4.3) version, so I just check when versions are older, and then
walk through the whole map.. */
* OWNER_NONE, not OWNER_WATER.. I can't replicate it for the current
* (4.3) version, so I just check when versions are older, and then
* walk through the whole map.. */
if (CheckSavegameVersionOldStyle(4, 3)) {
for (TileIndex t = 0; t < map_size; t++) {
if (IsTileType(t, MP_WATER) && GetTileOwner(t) >= MAX_PLAYERS) {
@@ -2034,8 +2034,8 @@ bool AfterLoadGame()
}
}
/* Check that house ids are still valid. */
CheckHouseIDs();
/* Check and update house and town values */
UpdateHousesAndTowns();
if (CheckSavegameVersion(43)) {
for (TileIndex t = 0; t < map_size; t++) {
@@ -2461,8 +2461,8 @@ void ReloadNewGRFData()
/* update station and waypoint graphics */
AfterLoadWaypoints();
AfterLoadStations();
/* check that house ids are still valid */
CheckHouseIDs();
/* Check and update house and town values */
UpdateHousesAndTowns();
/* redraw the whole screen */
MarkWholeScreenDirty();
}