diff options
author | frosch <frosch@openttd.org> | 2009-05-15 22:45:31 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-05-15 22:45:31 +0000 |
commit | aea2fcd0a09fa47caf022934ba8029ec327906f7 (patch) | |
tree | d00f503c1467fd3126bf53e85ba5f76cea79004b /src | |
parent | 61400466ed22906fcd999f5db35320bfe9b775f5 (diff) | |
download | openttd-aea2fcd0a09fa47caf022934ba8029ec327906f7.tar.xz |
(svn r16314) -Fix (r9315): Allow accessing the houseage when the house is not yet built.
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf_house.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp index 816ea513b..3179edbfd 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); |