(svn r14611) -Fix (r13437)[FS#2421]: Store the age of a house in the map array instead of the construction year.

Note: Savegames from r13437 to now are broken and have a age of 255 years for a lot houses.
This commit is contained in:
frosch
2008-11-23 14:17:41 +00:00
parent 2fec4d8e3c
commit 70f2b95bda
6 changed files with 39 additions and 14 deletions

View File

@@ -316,7 +316,7 @@ static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte
case 0x40: return (IsTileType(tile, MP_HOUSE) ? GetHouseBuildingStage(tile) : 0) | TileHash2Bit(TileX(tile), TileY(tile)) << 2;
/* Building age. */
case 0x41: return Clamp(_cur_year - GetHouseConstructionYear(tile), 0, 0xFF);
case 0x41: return GetHouseAge(tile);
/* Town zone */
case 0x42: return GetTownRadiusGroup(town, tile);