From 48f0da1fdce9a9515649251c8761f0e1580c38c6 Mon Sep 17 00:00:00 2001 From: Andrii Danylchenko Date: Sun, 10 Dec 2023 18:38:54 +0200 Subject: [PATCH] #3290 - skip bad teleports (exit in rocks) --- lib/pathfinder/NodeStorage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pathfinder/NodeStorage.cpp b/lib/pathfinder/NodeStorage.cpp index 67c27fe68..07d283d19 100644 --- a/lib/pathfinder/NodeStorage.cpp +++ b/lib/pathfinder/NodeStorage.cpp @@ -100,6 +100,12 @@ std::vector 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); }