summaryrefslogtreecommitdiff
path: root/src
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
commitdffc12fb23df99a87920faa9ef88ceddff2a5968 (patch)
tree96dcc52dbf587bd892aa5b0ef45a0c667de94505 /src
parent5b3d1432df6e7460b40169a162fe5876d12bbccd (diff)
downloadopenttd-dffc12fb23df99a87920faa9ef88ceddff2a5968.tar.xz
(svn r14024) -Fix (r14019) [YAPP]: YAPF also skips tunnels and bridges. Honor that in penalty calculations. (michi_cc)
Diffstat (limited to 'src')
-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;
}