summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.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/waypoint_cmd.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/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 51d192802..62b733bd0 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -124,7 +124,7 @@ static CommandCost IsValidTileForWaypoint(TileIndex tile, Axis axis, StationID *
if (ret.Succeeded()) ret = EnsureNoVehicleOnGround(tile);
if (ret.Failed()) return ret;
- Slope tileh = GetTilePixelSlope(tile, NULL);
+ Slope tileh = GetTileSlope(tile);
if (tileh != SLOPE_FLAT &&
(!_settings_game.construction.build_on_slopes || IsSteepSlope(tileh) || !(tileh & (0x3 << axis)) || !(tileh & ~(0x3 << axis)))) {
return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED);
@@ -285,7 +285,7 @@ CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (tile == 0 || !HasTileWaterGround(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
- if (GetTilePixelSlope(tile, NULL) != SLOPE_FLAT) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
+ if (GetTileSlope(tile) != SLOPE_FLAT) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
/* Check if there is an already existing, deleted, waypoint close to us that we can reuse. */
Waypoint *wp = FindDeletedWaypointCloseTo(tile, STR_SV_STNAME_BUOY, OWNER_NONE);