(svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope information for situations when we only want to know if a tile is flat or not (cirdan, LordAro)

This commit is contained in:
zuu
2013-10-12 22:07:58 +00:00
parent e428c27a54
commit e124838db5
11 changed files with 51 additions and 27 deletions

View File

@@ -249,8 +249,7 @@ static void TileLoop_Clear(TileIndex tile)
/* If the tile is at any edge flood it to prevent maps without water. */
if (_settings_game.construction.freeform_edges && DistanceFromEdge(tile) == 1) {
int z;
Slope slope = GetTileSlope(tile, &z);
if (z == 0 && slope == SLOPE_FLAT) {
if (IsTileFlat(tile, &z) && z == 0) {
DoFloodTile(tile);
MarkTileDirtyByTile(tile);
return;