(svn r25848) -Codechange: Refactor check for if a tile is not an edge tile to new IsInnerTile method (cirdan, LordAro)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user