summaryrefslogtreecommitdiff
path: root/src/road_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/road_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/road_cmd.cpp')
-rw-r--r--src/road_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp
index 3cc2bb874..d1cb5fae1 100644
--- a/src/road_cmd.cpp
+++ b/src/road_cmd.cpp
@@ -254,7 +254,7 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec
switch (GetRoadTileType(tile)) {
case ROAD_TILE_NORMAL: {
- Slope tileh = GetTilePixelSlope(tile, NULL);
+ Slope tileh = GetTileSlope(tile);
/* Steep slopes behave the same as slopes with one corner raised. */
if (IsSteepSlope(tileh)) {
@@ -467,7 +467,7 @@ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
DisallowedRoadDirections toggle_drd = Extract<DisallowedRoadDirections, 6, 2>(p1);
- Slope tileh = GetTilePixelSlope(tile, NULL);
+ Slope tileh = GetTileSlope(tile);
bool need_to_clear = false;
switch (GetTileType(tile)) {
@@ -636,7 +636,7 @@ do_clear:;
/* Check if new road bits will have the same foundation as other existing road types */
if (IsNormalRoad(tile)) {
- Slope slope = GetTilePixelSlope(tile, NULL);
+ Slope slope = GetTileSlope(tile);
Foundation found_new = GetRoadFoundation(slope, pieces | existing);
/* Test if all other roadtypes can be built at that foundation */
@@ -909,7 +909,7 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (!IsValidRoadType(rt) || !ValParamRoadType(rt)) return CMD_ERROR;
- Slope tileh = GetTilePixelSlope(tile, NULL);
+ Slope tileh = GetTileSlope(tile);
if (tileh != SLOPE_FLAT && (
!_settings_game.construction.build_on_slopes ||
!CanBuildDepotByTileh(dir, tileh)