aystar.c
changeset 1617 c3d3caad6d1e
parent 1459 19333d7f99b3
child 1777 f703cf05b5b9
equal deleted inserted replaced
1616:ebc6759a6bb8 1617:c3d3caad6d1e
   144 	OpenListNode *current = AyStarMain_OpenList_Pop(aystar);
   144 	OpenListNode *current = AyStarMain_OpenList_Pop(aystar);
   145 	// If empty, drop an error
   145 	// If empty, drop an error
   146 	if (current == NULL) return AYSTAR_EMPTY_OPENLIST;
   146 	if (current == NULL) return AYSTAR_EMPTY_OPENLIST;
   147 
   147 
   148 	// Check for end node and if found, return that code
   148 	// Check for end node and if found, return that code
   149 	if (aystar->EndNodeCheck(aystar, &current->path.node) == AYSTAR_FOUND_END_NODE) {
   149 	if (aystar->EndNodeCheck(aystar, current) == AYSTAR_FOUND_END_NODE) {
   150 		if (aystar->FoundEndNode != NULL)
   150 		if (aystar->FoundEndNode != NULL)
   151 			aystar->FoundEndNode(aystar, current);
   151 			aystar->FoundEndNode(aystar, current);
   152 		free(current);
   152 		free(current);
   153 		return AYSTAR_FOUND_END_NODE;
   153 		return AYSTAR_FOUND_END_NODE;
   154 	}
   154 	}