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

This commit is contained in:
rubidium 2007-07-12 08:10:40 +00:00
parent 9dee540233
commit de084ace1c
1 changed files with 2 additions and 1 deletions

View File

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