(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
This commit is contained in:
@@ -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. */
|
||||
|
Reference in New Issue
Block a user