summaryrefslogtreecommitdiff
path: root/src/yapf/yapf_costrail.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yapf/yapf_costrail.hpp')
-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);
}