summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-07-11 16:32:13 +0000
committermichi_cc <michi_cc@openttd.org>2011-07-11 16:32:13 +0000
commit1e855be4924d113d1e1eefd6345f174a86a9ef0b (patch)
tree10a47e5e8685bdcd4292a0d2c22a6298c68f7212 /src
parentabf286e99048ac49f437569958c1c86c2203c7e0 (diff)
downloadopenttd-1e855be4924d113d1e1eefd6345f174a86a9ef0b.tar.xz
(svn r22655) -Add: [NewGRF] Add water class to the 'land info of nearby tiles' vars.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_commons.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp
index c26b5167f..8a50786fb 100644
--- a/src/newgrf_commons.cpp
+++ b/src/newgrf_commons.cpp
@@ -442,7 +442,7 @@ uint32 GetNearbyTileInformation(TileIndex tile)
uint z;
Slope tileh = GetTileSlope(tile, &z);
- byte terrain_type = GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
+ byte terrain_type = (HasTileWaterClass(tile) ? GetWaterClass(tile) : WATER_CLASS_INVALID) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
return tile_type << 24 | z << 16 | terrain_type << 8 | tileh;
}