summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-06-15 02:48:25 +0000
committerbelugas <belugas@openttd.org>2008-06-15 02:48:25 +0000
commitd095599b58e1617eafad01a11e03ca95cce5b4e6 (patch)
tree0ab10e9fdb6208be8066862eccb4e9c7ffd87d19 /src/newgrf_house.cpp
parent8fd2971bc390a522c68bf4c69c5d3e39f3f65695 (diff)
downloadopenttd-d095599b58e1617eafad01a11e03ca95cce5b4e6.tar.xz
(svn r13519) -Feature[newGRF]: Implement var 63, variational action2 variable for Houses.
Or, in more simple terms, the check for the animation frame of nearby house.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 4ece1f1ac..c794f5233 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -254,6 +254,12 @@ static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte
/* Land info for nearby tiles. */
case 0x62: return GetNearbyTileInformation(parameter, tile);
+ /* Current animation frame of nearby house tiles */
+ case 0x63: {
+ TileIndex testtile = GetNearbyTile(parameter, tile);
+ return IsTileType(testtile, MP_HOUSE) ? GetHouseAnimationFrame(testtile) : 0;
+ }
+
/* Read GRF parameter */
case 0x7F: return GetGRFParameter(object->u.house.house_id, parameter);
}