Mercurial > hg > openttd
changeset 9877:dc99ca000148 draft
(svn r14024) -Fix (r14019) [YAPP]: YAPF also skips tunnels and bridges. Honor that in penalty calculations. (michi_cc)
author | smatz <smatz@openttd.org> |
---|---|
date | Fri, 08 Aug 2008 15:02:21 +0000 |
parents | f781986a229f |
children | 2181c2515428 |
files | src/yapf/yapf_costrail.hpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/yapf/yapf_costrail.hpp +++ b/src/yapf/yapf_costrail.hpp @@ -159,7 +159,7 @@ } 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; }