浏览代码

#3290 - skip bad teleports (exit in rocks)

Andrii Danylchenko 1 年之前
父节点
当前提交
48f0da1fdc
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      lib/pathfinder/NodeStorage.cpp

+ 6 - 0
lib/pathfinder/NodeStorage.cpp

@@ -100,6 +100,12 @@ std::vector<CGPathNode *> NodeStorage::calculateTeleportations(
 	{
 		auto * node = getNode(neighbour, source.node->layer);
 
+		if(!node->coord.valid())
+		{
+			logAi->debug("Teleportation exit is blocked " + neighbour.toString());
+			continue;
+		}
+
 		neighbours.push_back(node);
 	}