* @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 */
| 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 | */ |
| 122 | PATHNODE *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. |