diff options
author | rubidium <rubidium@openttd.org> | 2008-08-02 22:51:38 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-08-02 22:51:38 +0000 |
commit | 22b787791fc06423fd1d6b76ee78372febe027cb (patch) | |
tree | 516461a2cb4895dd0fe7f43510712cb25bbcad65 /src/yapf | |
parent | 968a0e907c6567d447aa2905c6c21cf04b432e0f (diff) | |
download | openttd-22b787791fc06423fd1d6b76ee78372febe027cb.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.hpp | 2 |
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); } |