Count pathgrids with 0-1 nodes as non-existent

This commit is contained in:
Evil Eye 2025-08-20 21:47:57 +02:00
parent 4707d7602d
commit 8caf68ad30

View File

@ -637,7 +637,7 @@ namespace MWMechanics
const MWWorld::Cell& cell = *actor.getCell()->getCell();
const ESM::Pathgrid* pathgrid = world.getStore().get<ESM::Pathgrid>().search(cell);
// Moved to a cell without a pathgrid
if (pathgrid == nullptr)
if (pathgrid == nullptr || pathgrid->mPoints.size() < 2)
{
storage.mAllowedPositions.clear();
return;