diff options
author | Erich Eckner <git@eckner.net> | 2018-10-30 11:13:12 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-30 15:28:03 +0100 |
commit | a34d095259409cf1454d9777deabbc00bcdb9407 (patch) | |
tree | 9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/pathfinder/yapf/yapf_road.cpp | |
parent | 6647cb917963c4e0d6d633b7a92af78167050893 (diff) | |
download | openttd-underground-plus-others-original.tar.xz |
underground patch appliedunderground-plus-others-original
Diffstat (limited to 'src/pathfinder/yapf/yapf_road.cpp')
-rw-r--r-- | src/pathfinder/yapf/yapf_road.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index 82493241f..9e4317810 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -90,6 +90,9 @@ protected: } else { /* non-diagonal trackdir */ cost = YAPF_TILE_CORNER_LENGTH + Yapf().PfGetSettings().road_curve_penalty; + + /* Extra cost for traffic lights. */ + if (HasTrafficLights(tile)) cost += Yapf().PfGetSettings().road_trafficlight_penalty; } return cost; } |