summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-08-08 15:02:21 +0000
committersmatz <smatz@openttd.org>2008-08-08 15:02:21 +0000
commitcc3685ffaffc4670de06865654ff845992a478e9 (patch)
tree96dcc52dbf587bd892aa5b0ef45a0c667de94505 /src/yapf
parent872cefeb27a572135da6e15e78d80bb215c275c3 (diff)
downloadopenttd-cc3685ffaffc4670de06865654ff845992a478e9.tar.xz
(svn r14024) -Fix (r14019) [YAPP]: YAPF also skips tunnels and bridges. Honor that in penalty calculations. (michi_cc)
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/yapf_costrail.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp
index ebfa9a6a7..edcb7c7e8 100644
--- a/src/yapf/yapf_costrail.hpp
+++ b/src/yapf/yapf_costrail.hpp
@@ -159,7 +159,7 @@ public:
} else if (TrackOverlapsTracks(GetReservedTrackbits(tile), TrackdirToTrack(trackdir))) {
int cost = Yapf().PfGetSettings().rail_pbs_cross_penalty;
if (!IsDiagonalTrackdir(trackdir)) cost = (cost * YAPF_TILE_CORNER_LENGTH) / YAPF_TILE_LENGTH;
- return cost;
+ return cost * (skipped + 1);
}
return 0;
}