mirror of https://github.com/OpenTTD/OpenTTD
(svn r23708) -Codechange: apply the same trick as r23701 to GetTileSlope(), gaining similar benefits
parent
62b00c1da8
commit
cb414b09d2
|
@ -22,8 +22,11 @@ Slope GetTileSlope(TileIndex tile, int *h)
|
||||||
{
|
{
|
||||||
assert(tile < MapSize());
|
assert(tile < MapSize());
|
||||||
|
|
||||||
if (TileX(tile) == MapMaxX() || TileY(tile) == MapMaxY() ||
|
uint x = TileX(tile);
|
||||||
(_settings_game.construction.freeform_edges && (TileX(tile) == 0 || TileY(tile) == 0))) {
|
uint y = TileY(tile);
|
||||||
|
|
||||||
|
if (x == MapMaxX() || y == MapMaxY() ||
|
||||||
|
((x == 0 || y == 0) && _settings_game.construction.freeform_edges)) {
|
||||||
if (h != NULL) *h = TileHeight(tile);
|
if (h != NULL) *h = TileHeight(tile);
|
||||||
return SLOPE_FLAT;
|
return SLOPE_FLAT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue