VarAction2: Adjust masking in GetNearbyTileInformation

This commit is contained in:
Jonathan G Rennison
2022-06-06 21:10:54 +01:00
parent 4b7288902d
commit 2663cc3fdc

View File

@@ -459,7 +459,7 @@ uint32 GetNearbyTileInformation(TileIndex tile, bool grf_version8, uint32 mask)
result |= tile_type << 24;
}
if (mask & 0xFF00) {
if (mask & 0xFE00) {
/* Return 0 if the tile is a land tile */
byte terrain_type = (HasTileWaterClass(tile) ? (GetWaterClass(tile) + 1) & 3 : 0) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
result |= terrain_type << 8;