summaryrefslogtreecommitdiff
path: root/src/newgrf_house.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-04 12:06:38 +0000
committerrubidium <rubidium@openttd.org>2007-09-04 12:06:38 +0000
commit222e105ec7ce0b8ffe24dbaa60180eb5ca13b7eb (patch)
treee6b5e96fc5db5b625057e1eab560f1a6bb9c3e2a /src/newgrf_house.cpp
parentcadf412dcd713c907f07d517cf8f393ab48c693d (diff)
downloadopenttd-222e105ec7ce0b8ffe24dbaa60180eb5ca13b7eb.tar.xz
(svn r11042) -Fix [FS#1196]: so newgrf callbacks returned slightly wrong heights (height of nothern corner instead of height of lowest corner). Patch by frosch.
Diffstat (limited to 'src/newgrf_house.cpp')
-rw-r--r--src/newgrf_house.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index b66d1be38..921c0dc10 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -185,7 +185,9 @@ uint32 GetNearbyTileInformation(byte parameter, TileIndex tile)
tile = GetNearbyTile(parameter, tile);
tile_type = GetTerrainType(tile) << 2 | (IsTileType(tile, MP_WATER) ? 1 : 0) << 1;
- return GetTileType(tile) << 24 | (TileHeight(tile) * 8) << 16 | tile_type << 8 | GetTileSlope(tile, NULL);
+ uint z;
+ Slope tileh = GetTileSlope(tile, &z);
+ return GetTileType(tile) << 24 | z << 16 | tile_type << 8 | tileh;
}
/**