Changeset - r7238:ca498c2cb6be
[Not reviewed]
master
0 1 0
rubidium - 17 years ago 2007-07-12 08:10:40
rubidium@openttd.org
(svn r10519) -Fix: when getting a "nearby" tile, make sure you never roam outside of the map.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_commons.cpp
Show inline comments
 
@@ -265,5 +265,6 @@ TileIndex GetNearbyTile(byte parameter, 
 
	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));
 
}
0 comments (0 inline, 0 general)