summaryrefslogtreecommitdiff
path: root/src/pathfinder/npf/npf.cpp
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-30 11:13:12 +0100
committerErich Eckner <git@eckner.net>2018-10-30 15:28:03 +0100
commita34d095259409cf1454d9777deabbc00bcdb9407 (patch)
tree9e7c37ed33f5bd6b3c2f41cf248dcb656b2a4afa /src/pathfinder/npf/npf.cpp
parent6647cb917963c4e0d6d633b7a92af78167050893 (diff)
downloadopenttd-underground-plus-others-original.tar.xz
underground patch appliedunderground-plus-others-original
Diffstat (limited to 'src/pathfinder/npf/npf.cpp')
-rw-r--r--src/pathfinder/npf/npf.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 5c4ccb3cc..f8cca276f 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -333,6 +333,8 @@ static int32 NPFRoadPathCost(AyStar *as, AyStarNode *current, OpenListNode *pare
cost = NPF_TILE_LENGTH;
/* Increase the cost for level crossings */
if (IsLevelCrossing(tile)) cost += _settings_game.pf.npf.npf_crossing_penalty;
+ /* Increase the cost for juctions with trafficlights. */
+ if (HasTrafficLights(tile)) cost += _settings_game.pf.npf.npf_road_trafficlight_penalty;
break;
case MP_STATION: {