From 605e6d75af28869821819b4dd1194347ff1135ea Mon Sep 17 00:00:00 2001 From: KUDr Date: Sat, 4 Nov 2006 11:44:19 +0000 Subject: (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 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; -- cgit v1.2.3-70-g09d2