diff options
author | frosch <frosch@openttd.org> | 2011-09-25 13:35:17 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-09-25 13:35:17 +0000 |
commit | 8d5c1479f417dc8a79997a6c4a1b357fb30a9411 (patch) | |
tree | 05f340e63c07d081cb44f5a7b6424b874e812057 /src/rail_cmd.cpp | |
parent | fa1f8b309e13aa2872f6c520c0bcb121e559eb6b (diff) | |
download | openttd-8d5c1479f417dc8a79997a6c4a1b357fb30a9411.tar.xz |
(svn r22960) -Feature: Allow depots, standard roadstops and airports on steep slopes.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 95ff6440f..35895c38a 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -874,7 +874,6 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u if (tileh != SLOPE_FLAT && ( !_settings_game.construction.build_on_slopes || - IsSteepSlope(tileh) || !CanBuildDepotByTileh(dir, tileh) )) { return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED); @@ -2338,15 +2337,15 @@ void DrawTrainDepotSprite(int x, int y, int dir, RailType railtype) static uint GetSlopeZ_Track(TileIndex tile, uint x, uint y) { - uint z; - Slope tileh = GetTileSlope(tile, &z); - - if (tileh == SLOPE_FLAT) return z; if (IsPlainRail(tile)) { + uint z; + Slope tileh = GetTileSlope(tile, &z); + if (tileh == SLOPE_FLAT) return z; + z += ApplyFoundationToSlope(GetRailFoundation(tileh, GetTrackBits(tile)), &tileh); return z + GetPartialZ(x & 0xF, y & 0xF, tileh); } else { - return z + TILE_HEIGHT; + return GetTileMaxZ(tile); } } |