summaryrefslogtreecommitdiff
path: root/src/pathfinder/yapf/yapf_road.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pathfinder/yapf/yapf_road.cpp')
-rw-r--r--src/pathfinder/yapf/yapf_road.cpp3
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;
}