From 8d5c1479f417dc8a79997a6c4a1b357fb30a9411 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 25 Sep 2011 13:35:17 +0000 Subject: (svn r22960) -Feature: Allow depots, standard roadstops and airports on steep slopes. --- src/road_cmd.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/road_cmd.cpp') diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index 64e59640c..e9276e809 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -918,7 +918,6 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui Slope tileh = GetTileSlope(tile, NULL); if (tileh != SLOPE_FLAT && ( !_settings_game.construction.build_on_slopes || - IsSteepSlope(tileh) || !CanBuildDepotByTileh(dir, tileh) )) { return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); @@ -1343,16 +1342,17 @@ void UpdateNearestTownForRoadTiles(bool invalidate) static uint GetSlopeZ_Road(TileIndex tile, uint x, uint y) { - uint z; - Slope tileh = GetTileSlope(tile, &z); - if (tileh == SLOPE_FLAT) return z; if (IsNormalRoad(tile)) { + uint z; + Slope tileh = GetTileSlope(tile, &z); + if (tileh == SLOPE_FLAT) return z; + Foundation f = GetRoadFoundation(tileh, GetAllRoadBits(tile)); z += ApplyFoundationToSlope(f, &tileh); return z + GetPartialZ(x & 0xF, y & 0xF, tileh); } else { - return z + TILE_HEIGHT; + return GetTileMaxZ(tile); } } -- cgit v1.2.3-54-g00ecf