Changeset - r17873:62c738837ee0
[Not reviewed]
master
0 1 0
planetmaker - 13 years ago 2011-07-21 17:17:48
planetmaker@openttd.org
(svn r22679) -Change [FS#4692] (r22655): [NewGRF] Use a value of 0 to indicate the invalid waterclass in the nearby land info (0x60 ind. tiles, 0x62 houses, objects,...)
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_commons.cpp
Show inline comments
 
@@ -447,7 +447,8 @@ uint32 GetNearbyTileInformation(TileInde
 

	
 
	uint z;
 
	Slope tileh = GetTileSlope(tile, &z);
 
	byte terrain_type = (HasTileWaterClass(tile) ? GetWaterClass(tile) : WATER_CLASS_INVALID) << 5 | GetTerrainType(tile) << 2 | (tile_type == MP_WATER ? 1 : 0) << 1;
 
	/* 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;
 
	return tile_type << 24 | z << 16 | terrain_type << 8 | tileh;
 
}
 

	
0 comments (0 inline, 0 general)