(svn r10519) -Fix: when getting a "nearby" tile, make sure you never roam outside of the map.
This commit is contained in:
		@@ -265,5 +265,6 @@ TileIndex GetNearbyTile(byte parameter, TileIndex tile)
 | 
			
		||||
	if (x >= 8) x -= 16;
 | 
			
		||||
	if (y >= 8) y -= 16;
 | 
			
		||||
 | 
			
		||||
	return tile + TileDiffXY(x, y);
 | 
			
		||||
	/* Make sure we never roam outside of the map */
 | 
			
		||||
	return TILE_MASK(tile + TileDiffXY(x, y));
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user