MCPcopy Create free account
hub / github.com/DrewKestell/BloogBot / GetNavMeshQuery

Method GetNavMeshQuery

Navigation/MoveMap.cpp:244–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 }
243
244 dtNavMeshQuery const* MMapManager::GetNavMeshQuery(unsigned int mapId, unsigned int instanceId)
245 {
246 if (loadedMMaps.find(mapId) == loadedMMaps.end())
247 {
248 return NULL;
249 }
250
251 MMapData* mmap = loadedMMaps[mapId];
252 if (mmap->navMeshQueries.find(instanceId) == mmap->navMeshQueries.end())
253 {
254 dtNavMeshQuery* query = dtAllocNavMeshQuery();
255 dtStatus dtResult = query->init(mmap->navMesh, 65535);
256 if (dtStatusFailed(dtResult))
257 {
258 dtFreeNavMeshQuery(query);
259 return NULL;
260 }
261
262 mmap->navMeshQueries.insert(std::pair<unsigned int, dtNavMeshQuery*>(instanceId, query));
263 }
264
265 return mmap->navMeshQueries[instanceId];
266 }
267
268 bool hasLoadedWesternContinent()
269 {

Callers 1

PathFinderMethod · 0.80

Calls 7

dtAllocNavMeshQueryFunction · 0.85
dtStatusFailedFunction · 0.85
dtFreeNavMeshQueryFunction · 0.85
findMethod · 0.45
endMethod · 0.45
initMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected