1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-09 13:14:02 +02:00

Merge pull request #4708 from IvanSavenko/subterra_pathfinder_fix

Fixes pathfinding via subterranean gates located on right edge of map
This commit is contained in:
Ivan Savenko 2024-10-06 16:00:09 +03:00 committed by GitHub
commit f17fe6a48e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -964,7 +964,7 @@ std::vector<ObjectInstanceID> CGameInfoCallback::getVisibleTeleportObjects(std::
vstd::erase_if(ids, [&](const ObjectInstanceID & id) -> bool
{
const auto * obj = getObj(id, false);
return player != PlayerColor::UNFLAGGABLE && (!obj || !isVisible(obj->pos, player));
return player != PlayerColor::UNFLAGGABLE && (!obj || !isVisible(obj->visitablePos(), player));
});
return ids;
}