From 9ec0ca332c2da5d7c1a19bb6268f776d99dbdb04 Mon Sep 17 00:00:00 2001 From: Nordsoft91 Date: Tue, 9 Aug 2022 16:12:58 +0400 Subject: [PATCH] Fix for sealed-off treasures (#771) Fix for sealer-off treasures --- lib/rmg/Zone.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rmg/Zone.cpp b/lib/rmg/Zone.cpp index cd83aa97c..627a397d1 100644 --- a/lib/rmg/Zone.cpp +++ b/lib/rmg/Zone.cpp @@ -155,7 +155,7 @@ rmg::Path Zone::searchPath(const rmg::Area & src, bool onlyStraight, std::functi }; auto area = (dAreaPossible + dAreaFree).getSubarea(areafilter); - rmg::Path freePath(area); + rmg::Path freePath(area), resultPath(area); freePath.connect(dAreaFree); //connect to all pieces @@ -167,9 +167,10 @@ rmg::Path Zone::searchPath(const rmg::Area & src, bool onlyStraight, std::functi return rmg::Path::invalid(); freePath.connect(path.getPathArea()); + resultPath.connect(path.getPathArea()); } - return freePath; + return resultPath; } rmg::Path Zone::searchPath(const int3 & src, bool onlyStraight, std::function areafilter) const