summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2008-11-23 14:17:41 +0000
committerfrosch <frosch@openttd.org>2008-11-23 14:17:41 +0000
commit3d467cabe5ff086a76ecee1c9ae91da3f3caf35d (patch)
treef40e12e3b8552cbd2e88bf34163d9d6bd7504306 /src/newgrf_house.cpp
parent2277a1ff9ccd2e5a5acca1e815f628f054c84491 (diff)
downloadopenttd-3d467cabe5ff086a76ecee1c9ae91da3f3caf35d.tar.xz
(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.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index f112936f0..ce7558f97 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -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);