Changeset - r5018:3b0420351293
[Not reviewed]
master
0 1 0
KUDr - 18 years ago 2006-11-04 11:44:19
kudr@openttd.org
(svn r7059) -Fix [FS#384]: Tunnel YAPF Penalty Incorrect. The penalty for upward slope was incorrectly applied on tunnel entrances. (Danny)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
yapf/yapf_costbase.hpp
Show inline comments
 
/* $Id$ */
 

	
 
#ifndef  YAPF_COSTBASE_HPP
 
#define  YAPF_COSTBASE_HPP
 

	
 
struct CYapfCostBase {
 
	static const TrackdirBits   c_upwards_slopes[16];
 

	
 
	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;
 
			}
 
		}
 
		return false;
 
	}
 
};
 

	
 
struct CostRailSettings {
 
	// look-ahead signal penalty
 
};
0 comments (0 inline, 0 general)