aystar.c
changeset 1459 19333d7f99b3
parent 1095 b59632d9df1b
child 1617 c3d3caad6d1e
equal deleted inserted replaced
1458:d4d918bdb74a 1459:19333d7f99b3
   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) == AYSTAR_FOUND_END_NODE) {
   149 	if (aystar->EndNodeCheck(aystar, &current->path.node) == 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 	}