MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / FetchPathNode

Method FetchPathNode

Source/Utils/micropather.cpp:419–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417
418
419PathNode* PathNodePool::FetchPathNode( cPosition state )
420{
421 unsigned key = Hash( state );
422
423 PathNode* root = hashTable[key];
424 while( root ) {
425 if ( root->state == state ) {
426 break;
427 }
428 root = ( state < root->state ) ? root->child[0] : root->child[1];
429 }
430 MPASSERT( root );
431 return root;
432}
433
434
435PathNode* PathNodePool::GetPathNode( unsigned frame, cPosition _state, float _costFromStart, float _estToGoal, PathNode* _parent )

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected