changeset 5018:3c2d3d948dfe draft

(svn r7059) -Fix [FS#384]: Tunnel YAPF Penalty Incorrect. The penalty for upward slope was incorrectly applied on tunnel entrances. (Danny)
author KUDr <KUDr@openttd.org>
date Sat, 04 Nov 2006 11:44:19 +0000
parents ee0d91f464a0
children e8bee72031ee
files yapf/yapf_costbase.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/yapf/yapf_costbase.hpp
+++ b/yapf/yapf_costbase.hpp
@@ -8,7 +8,7 @@
 
 	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;