From 662bb0d1f6dc3b690610b9efbd3dbc34cc76563f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Zieli=C5=84ski?= Date: Wed, 20 Mar 2024 10:03:26 +0100 Subject: [PATCH] Cut straight paths for better passability --- lib/rmg/Zone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rmg/Zone.cpp b/lib/rmg/Zone.cpp index 81d18135a..a2043f635 100644 --- a/lib/rmg/Zone.cpp +++ b/lib/rmg/Zone.cpp @@ -339,7 +339,7 @@ void Zone::fractalize() Lock lock(areaMutex); //Connect with free areas - auto areas = connectedAreas(clearedTiles, false); + auto areas = connectedAreas(clearedTiles, true); for(auto & area : areas) { if(dAreaFree.overlap(area)) @@ -348,7 +348,7 @@ void Zone::fractalize() auto availableArea = dAreaPossible + dAreaFree; rmg::Path path(availableArea); path.connect(dAreaFree); - auto res = path.search(area, false); + auto res = path.search(area, true); if(res.getPathArea().empty()) { dAreaPossible.subtract(area);