summaryrefslogtreecommitdiff
path: root/src/landscape.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-11-04 10:22:27 +0000
committerrubidium <rubidium@openttd.org>2011-11-04 10:22:27 +0000
commit2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338 (patch)
tree9086d7e7b83871e60d43d838fd5f005ef50c5063 /src/landscape.cpp
parenta36551dbb4a6aa8a10e99df8331ac4ecb8586270 (diff)
downloadopenttd-2ed0f93bfbd27ba4b4dc3e590556ffae6d9b9338.tar.xz
(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
Diffstat (limited to 'src/landscape.cpp')
-rw-r--r--src/landscape.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp
index 0f1e30a42..f70cbeda8 100644
--- a/src/landscape.cpp
+++ b/src/landscape.cpp
@@ -964,7 +964,7 @@ static bool FindSpring(TileIndex tile, void *user_data)
static bool MakeLake(TileIndex tile, void *user_data)
{
uint height = *(uint*)user_data;
- if (!IsValidTile(tile) || TileHeight(tile) != height || GetTilePixelSlope(tile, NULL) != SLOPE_FLAT) return false;
+ if (!IsValidTile(tile) || TileHeight(tile) != height || GetTileSlope(tile) != SLOPE_FLAT) return false;
if (_settings_game.game_creation.landscape == LT_TROPIC && GetTropicZone(tile) == TROPICZONE_DESERT) return false;
for (DiagDirection d = DIAGDIR_BEGIN; d < DIAGDIR_END; d++) {
@@ -1113,7 +1113,7 @@ static bool FlowRiver(bool *marks, TileIndex spring, TileIndex begin)
queue.pop_front();
uint height2 = TileHeight(end);
- if (GetTilePixelSlope(end, NULL) == SLOPE_FLAT && (height2 < height || (height2 == height && IsWaterTile(end)))) {
+ if (GetTileSlope(end) == SLOPE_FLAT && (height2 < height || (height2 == height && IsWaterTile(end)))) {
found = true;
break;
}
@@ -1140,7 +1140,7 @@ static bool FlowRiver(bool *marks, TileIndex spring, TileIndex begin)
if (IsValidTile(lakeCenter) &&
/* A river, or lake, can only be built on flat slopes. */
- GetTilePixelSlope(lakeCenter, NULL) == SLOPE_FLAT &&
+ GetTileSlope(lakeCenter) == SLOPE_FLAT &&
/* We want the lake to be built at the height of the river. */
TileHeight(begin) == TileHeight(lakeCenter) &&
/* We don't want the lake at the entry of the valley. */