mirror of https://github.com/OpenTTD/OpenTTD
(svn r7059) -Fix [FS#384]: Tunnel YAPF Penalty Incorrect. The penalty for upward slope was incorrectly applied on tunnel entrances. (Danny)
parent
5f4118c638
commit
605e6d75af
|
@ -8,7 +8,7 @@ struct CYapfCostBase {
|
||||||
|
|
||||||
FORCEINLINE static bool stSlopeCost(TileIndex tile, Trackdir td)
|
FORCEINLINE static bool stSlopeCost(TileIndex tile, Trackdir td)
|
||||||
{
|
{
|
||||||
if (IsDiagonalTrackdir(td)) {
|
if (IsDiagonalTrackdir(td) && !IsTunnelTile(tile)) {
|
||||||
uint tile_slope = GetTileSlope(tile, NULL) & 0x0F;
|
uint tile_slope = GetTileSlope(tile, NULL) & 0x0F;
|
||||||
if ((c_upwards_slopes[tile_slope] & TrackdirToTrackdirBits(td)) != 0) {
|
if ((c_upwards_slopes[tile_slope] & TrackdirToTrackdirBits(td)) != 0) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue