MCPcopy Create free account
hub / github.com/diasurgical/devilution / GetNextPath

Function GetNextPath

Source/path.cpp:122–135  ·  view source on GitHub ↗

* @brief get the next node on the A* frontier to explore (estimated to be closest to the goal), mark it as visited, and return it */

Source from the content-addressed store, hash-verified

120 * @brief get the next node on the A* frontier to explore (estimated to be closest to the goal), mark it as visited, and return it
121 */
122PATHNODE *GetNextPath()
123{
124 PATHNODE *result;
125
126 result = path_2_nodes->NextNode;
127 if (result == NULL) {
128 return result;
129 }
130
131 path_2_nodes->NextNode = result->NextNode;
132 result->NextNode = pnode_ptr->NextNode;
133 pnode_ptr->NextNode = result;
134 return result;
135}
136
137/**
138 * @brief check if stepping from pPath to (dx,dy) cuts a corner.

Callers 1

FindPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected