浏览代码

Fix for sealed-off treasures (#771)

Fix for sealer-off treasures
Nordsoft91 3 年之前
父节点
当前提交
2edf9ef3a4
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      lib/rmg/Zone.cpp

+ 3 - 2
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<bool(const int3 &)> areafilter) const