Core/MMaps: Fixed pathing for objects that have terrain swaps active

This commit is contained in:
Shauren authored and Ovahlord committed 2023-08-08 00:21:48 +02:00
1 parent 96b1933a6c
commit bfd31d59c2
7 files changed
+62 -32

No files matched your search

+2 -2
View File
@@ -44,8 +44,8 @@ PathGenerator::PathGenerator(WorldObject const* owner) :
if (DisableMgr::IsPathfindingEnabled(mapId))
{
MMAP::MMapManager* mmap = MMAP::MMapFactory::createOrGetMMapManager();
_navMesh = mmap->GetNavMesh(mapId);
_navMeshQuery = mmap->GetNavMeshQuery(mapId, _source->GetInstanceId());
_navMeshQuery = mmap->GetNavMeshQuery(mapId, _source->GetMapId(), _source->GetInstanceId());
_navMesh = _navMeshQuery ? _navMeshQuery->getAttachedNavMesh() : mmap->GetNavMesh(mapId);
}
CreateFilter();