1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-05-22 09:55:17 +02:00

Fix defence crashes and hangs

This commit is contained in:
Andrii Danylchenko
2021-05-16 15:00:24 +03:00
committed by Andrii Danylchenko
parent 3dc76cfe35
commit 3d91f2e988
12 changed files with 206 additions and 67 deletions
@@ -155,14 +155,14 @@ Goals::TGoalVec CaptureObjectsBehavior::decompose() const
logAi->debug("Scanning objects, count %d", objs.size());
for(auto objToVisit : objs)
{
{
if(!objectMatchesFilter(objToVisit))
continue;
#if AI_TRACE_LEVEL >= 1
logAi->trace("Checking object %s, %s", objToVisit->getObjectName(), objToVisit->visitablePos().toString());
#endif
if(!objectMatchesFilter(objToVisit))
continue;
const int3 pos = objToVisit->visitablePos();
auto paths = ai->nullkiller->pathfinder->getPathInfo(pos);