summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-12-10 22:18:16 +0000
committeryexo <yexo@openttd.org>2010-12-10 22:18:16 +0000
commitfff4bdecd8bfd9a4609295348689e0255969d7d3 (patch)
treedc4d899be883f3e490026a04aa6bf193215205d3 /src
parent77aa035e4a5543428cf21c07f705cbe1700d98cc (diff)
downloadopenttd-fff4bdecd8bfd9a4609295348689e0255969d7d3.tar.xz
(svn r21456) -Fix: [NewGRF] make sure the parameter for house var 60 is the id of an original house
Diffstat (limited to 'src')
-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 ef9aa2d0e..44e0347ac 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -288,7 +288,7 @@ static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte
case 0x47: return TileY(tile) << 16 | TileX(tile);
/* Building counts for old houses with id = parameter. */
- case 0x60: return GetNumHouses(parameter, town);
+ case 0x60: return parameter < NEW_HOUSE_OFFSET ? GetNumHouses(parameter, town) : 0;
/* Building counts for new houses with id = parameter. */
case 0x61: {