(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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user