(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it
This commit is contained in:
@@ -2347,7 +2347,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
if (distant_join && (!_settings_game.station.distant_join_stations || !Station::IsValidID(station_to_join))) return CMD_ERROR;
|
||||
|
||||
DiagDirection direction = GetInclinedSlopeDirection(GetTilePixelSlope(tile, NULL));
|
||||
DiagDirection direction = GetInclinedSlopeDirection(GetTileSlope(tile));
|
||||
if (direction == INVALID_DIAGDIR) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||
direction = ReverseDiagDir(direction);
|
||||
|
||||
@@ -2364,7 +2364,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
|
||||
TileIndex tile_cur = tile + TileOffsByDiagDir(direction);
|
||||
|
||||
if (!IsTileType(tile_cur, MP_WATER) || GetTilePixelSlope(tile_cur, NULL) != SLOPE_FLAT) {
|
||||
if (!IsTileType(tile_cur, MP_WATER) || GetTileSlope(tile_cur) != SLOPE_FLAT) {
|
||||
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||
}
|
||||
|
||||
@@ -2377,7 +2377,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
if (ret.Failed()) return ret;
|
||||
|
||||
tile_cur += TileOffsByDiagDir(direction);
|
||||
if (!IsTileType(tile_cur, MP_WATER) || GetTilePixelSlope(tile_cur, NULL) != SLOPE_FLAT) {
|
||||
if (!IsTileType(tile_cur, MP_WATER) || GetTileSlope(tile_cur) != SLOPE_FLAT) {
|
||||
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||
}
|
||||
|
||||
@@ -2898,7 +2898,7 @@ static void TileLoop_Station(TileIndex tile)
|
||||
break;
|
||||
|
||||
case STATION_DOCK:
|
||||
if (GetTilePixelSlope(tile, NULL) != SLOPE_FLAT) break; // only handle water part
|
||||
if (GetTileSlope(tile) != SLOPE_FLAT) break; // only handle water part
|
||||
/* FALL THROUGH */
|
||||
case STATION_OILRIG: //(station part)
|
||||
case STATION_BUOY:
|
||||
|
Reference in New Issue
Block a user