(svn r10519) -Fix: when getting a "nearby" tile, make sure you never roam outside of the map.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
rubidium 17 years ago
parent 9dee540233
commit de084ace1c

@ -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));
}

Loading…
Cancel
Save