Browse Source

#3290 - skip bad teleports (exit in rocks)

Andrii Danylchenko 1 year ago
parent
commit
48f0da1fdc
1 changed files with 6 additions and 0 deletions
  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);
 	}