MCPcopy Create free account
hub / github.com/axmolengine/axmol / removeNavMeshAgent

Method removeNavMeshAgent

core/navmesh/NavMesh.cpp:436–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436void NavMesh::removeNavMeshAgent(NavMeshAgent* agent)
437{
438 auto iter = std::find(_agentList.begin(), _agentList.end(), agent);
439 if (iter != _agentList.end())
440 {
441 agent->removeFrom(_crowed);
442 agent->setNavMeshQuery(nullptr);
443 agent->release();
444 _agentList[iter - _agentList.begin()] = nullptr;
445 }
446}
447
448void NavMesh::addNavMeshAgent(NavMeshAgent* agent)
449{

Callers 2

onExitMethod · 0.80

Calls 6

setNavMeshQueryMethod · 0.80
findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
removeFromMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected