summaryrefslogtreecommitdiff
path: root/yapf
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
commit915906aebfecbecc09e795b825642049604a86e5 (patch)
tree7bf4c34c92f7917b4e65f3eb9a8b34b330ffa558 /yapf
parent22f82e397d217988afae58e4ad275ac3755d2e8c (diff)
downloadopenttd-915906aebfecbecc09e795b825642049604a86e5.tar.xz
(svn r7059) -Fix [FS#384]: Tunnel YAPF Penalty Incorrect. The penalty for upward slope was incorrectly applied on tunnel entrances. (Danny)
Diffstat (limited to 'yapf')
-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;