(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:
zuu
2013-10-12 22:03:13 +00:00
parent 026a83e4cf
commit e428c27a54
4 changed files with 21 additions and 10 deletions

View File

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