1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +02:00

- skip bad teleports (exit in rocks)

This commit is contained in:
Andrii Danylchenko 2023-12-10 18:38:54 +02:00
parent 6917e33ec3
commit 48f0da1fdc

@ -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);
}