From 915906aebfecbecc09e795b825642049604a86e5 Mon Sep 17 00:00:00 2001 From: KUDr Date: Sat, 4 Nov 2006 11:44:19 +0000 Subject: [PATCH] (svn r7059) -Fix [FS#384]: Tunnel YAPF Penalty Incorrect. The penalty for upward slope was incorrectly applied on tunnel entrances. (Danny) --- yapf/yapf_costbase.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapf/yapf_costbase.hpp b/yapf/yapf_costbase.hpp index 7aa141bc81..27fbe5e673 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;