summaryrefslogtreecommitdiff
path: root/src
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
commit237a6f554a54284292a393a9f972b57b813aebdc (patch)
tree0ab10e9fdb6208be8066862eccb4e9c7ffd87d19 /src
parent8bc42a8c2f374055d7e94ae78404c1b63c47b2fa (diff)
downloadopenttd-237a6f554a54284292a393a9f972b57b813aebdc.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')
-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);
}