From b35b8aa5bb38f9e47ca04ccd9302dd82546de0cd Mon Sep 17 00:00:00 2001 From: zuu Date: Sat, 12 Oct 2013 22:03:13 +0000 Subject: (svn r25848) -Codechange: Refactor check for if a tile is not an edge tile to new IsInnerTile method (cirdan, LordAro) --- src/tile_map.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/tile_map.cpp') diff --git a/src/tile_map.cpp b/src/tile_map.cpp index 017bb5c56..86670c88a 100644 --- a/src/tile_map.cpp +++ b/src/tile_map.cpp @@ -22,11 +22,7 @@ Slope GetTileSlope(TileIndex tile, int *h) { assert(tile < MapSize()); - uint x = TileX(tile); - uint y = TileY(tile); - - if (x == MapMaxX() || y == MapMaxY() || - ((x == 0 || y == 0) && _settings_game.construction.freeform_edges)) { + if (!IsInnerTile(tile)) { if (h != NULL) *h = TileHeight(tile); return SLOPE_FLAT; } -- cgit v1.2.3-54-g00ecf