Skip to content
Permalink
Browse files

Fix bad road connections near bridges and rivers

Esp. when those are 2 bridges next to each other
  • Loading branch information...
Wuzzy
Wuzzy committed Apr 23, 2014
1 parent 95cdc66 commit 855208c5c8f3fddb09268fc04db8caa1154cb902
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/overmap.cpp
@@ -2969,15 +2969,16 @@ void overmap::polish(const int z, const std::string &terrain_type)
// Sometimes a bridge will start at the edge of a river,
// and this looks ugly.
// So, fix it by making that square normal road;
// bit of a kludge but it works.
// also taking other road pieces that may be next
// to it into account. A bit of a kludge but it works.
} else if (ter(x, y, z) == "bridge_ns" &&
(!is_river(ter(x - 1, y, z)) ||
!is_river(ter(x + 1, y, z)))) {
ter(x, y, z) = "road_ns";
good_road("road", x, y, z);
} else if (ter(x, y, z) == "bridge_ew" &&
(!is_river(ter(x, y - 1, z)) ||
!is_river(ter(x, y + 1, z)))) {
ter(x, y, z) = "road_ew";
good_road("road", x, y, z);
} else if (check_ot_type("road", x, y, z)) {
good_road("road", x, y, z);
}

0 comments on commit 855208c

Please sign in to comment.
You can’t perform that action at this time.