summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-04-12 06:16:46 +0000
committerpeter1138 <peter1138@openttd.org>2007-04-12 06:16:46 +0000
commit8cdec9a2ab9e58cf6bba3845f1f8c317ff32ecd4 (patch)
treebc9754c3c3dd79bbab1723c37e7ccfd9866dbea3 /src
parent69982b1f018d120bd99338f9260760984a5ce98b (diff)
downloadopenttd-8cdec9a2ab9e58cf6bba3845f1f8c317ff32ecd4.tar.xz
(svn r9602) -Fix (r5833): Building rail on steep slopes ignored build_on_slopes patch setting.
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index be8e871ed..15f80502e 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -192,7 +192,7 @@ uint GetRailFoundation(Slope tileh, TrackBits bits)
static uint32 CheckRailSlope(Slope tileh, TrackBits rail_bits, TrackBits existing, TileIndex tile)
{
if (IsSteepSlope(tileh)) {
- if (existing == 0) {
+ if (_patches.build_on_slopes && existing == 0) {
TrackBits valid = TRACK_BIT_CROSS | (HASBIT(1 << SLOPE_STEEP_W | 1 << SLOPE_STEEP_E, tileh) ? TRACK_BIT_VERT : TRACK_BIT_HORZ);
if (valid & rail_bits) return _price.terraform;
}