From b7d1196093d62481654d57b0c7d4058b281761cf Mon Sep 17 00:00:00 2001 From: michi_cc Date: Mon, 11 Jul 2011 16:32:13 +0000 Subject: [PATCH] (svn r22655) -Add: [NewGRF] Add water class to the 'land info of nearby tiles' vars. --- src/newgrf_commons.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index c26b5167f1..8a50786fbe 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; }