From aea2fcd0a09fa47caf022934ba8029ec327906f7 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 15 May 2009 22:45:31 +0000 Subject: [PATCH] (svn r16314) -Fix (r9315): Allow accessing the houseage when the house is not yet built. --- src/newgrf_house.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 816ea513b9..3179edbfdf 100644 --- a/src/newgrf_house.cpp +++ b/src/newgrf_house.cpp @@ -255,7 +255,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 GetHouseAge(tile); + case 0x41: return IsTileType(tile, MP_HOUSE) ? GetHouseAge(tile) : 0; /* Town zone */ case 0x42: return GetTownRadiusGroup(town, tile);