summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-02 22:51:38 +0000
committerrubidium <rubidium@openttd.org>2008-08-02 22:51:38 +0000
commit2b153abd9337e8c2f9b5d896a4839701a3d07e53 (patch)
tree516461a2cb4895dd0fe7f43510712cb25bbcad65 /src/yapf
parentecc509195a75f67a06bfb4b0c74100bb29d07986 (diff)
downloadopenttd-2b153abd9337e8c2f9b5d896a4839701a3d07e53.tar.xz
(svn r13943) -Codechange [YAPP]: Reserved station tiles can now be penalized more in YAPF. This should help with spread out stations. (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 f959f1a3e..60eaae390 100644
--- a/src/yapf/yapf_costrail.hpp
+++ b/src/yapf/yapf_costrail.hpp
@@ -145,7 +145,7 @@ public:
if (n.m_num_signals_passed >= m_sig_look_ahead_costs.Size() / 2) return 0;
if (TrackOverlapsTracks(GetReservedTrackbits(tile), TrackdirToTrack(trackdir))) {
- int cost = Yapf().PfGetSettings().rail_pbs_cross_penalty;
+ int cost = IsRailwayStationTile(tile) ? Yapf().PfGetSettings().rail_pbs_station_penalty : Yapf().PfGetSettings().rail_pbs_cross_penalty;
if (!IsDiagonalTrackdir(trackdir)) cost = (cost * YAPF_TILE_CORNER_LENGTH) / YAPF_TILE_LENGTH;
return cost * (skipped + 1);
}