summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-11-04 11:44:19 +0000
committerKUDr <kudr@openttd.org>2006-11-04 11:44:19 +0000
commit605e6d75af28869821819b4dd1194347ff1135ea (patch)
tree7bf4c34c92f7917b4e65f3eb9a8b34b330ffa558
parent5f4118c6382c6c4e16a5d5013f7804640cd10948 (diff)
downloadopenttd-605e6d75af28869821819b4dd1194347ff1135ea.tar.xz
(svn r7059) -Fix [FS#384]: Tunnel YAPF Penalty Incorrect. The penalty for upward slope was incorrectly applied on tunnel entrances. (Danny)
-rw-r--r--yapf/yapf_costbase.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/yapf/yapf_costbase.hpp b/yapf/yapf_costbase.hpp
index 7aa141bc8..27fbe5e67 100644
--- a/yapf/yapf_costbase.hpp
+++ b/yapf/yapf_costbase.hpp
@@ -8,7 +8,7 @@ struct CYapfCostBase {
FORCEINLINE static bool stSlopeCost(TileIndex tile, Trackdir td)
{
- if (IsDiagonalTrackdir(td)) {
+ if (IsDiagonalTrackdir(td) && !IsTunnelTile(tile)) {
uint tile_slope = GetTileSlope(tile, NULL) & 0x0F;
if ((c_upwards_slopes[tile_slope] & TrackdirToTrackdirBits(td)) != 0) {
return true;