aystar.c
changeset 959 e6a3bbda610f
parent 926 a6d140a6a4de
child 1095 b59632d9df1b
equal deleted inserted replaced
958:a6217005ff41 959:e6a3bbda610f
    99 	// Get the pointer to the parent in the ClosedList (the currentone is to a copy of the one in the OpenList)
    99 	// Get the pointer to the parent in the ClosedList (the currentone is to a copy of the one in the OpenList)
   100 	closedlist_parent = AyStarMain_ClosedList_IsInList(aystar, &parent->path.node);
   100 	closedlist_parent = AyStarMain_ClosedList_IsInList(aystar, &parent->path.node);
   101 
   101 
   102 	// Check if this item is already in the OpenList
   102 	// Check if this item is already in the OpenList
   103 	if ((check = AyStarMain_OpenList_IsInList(aystar, current)) != NULL) {
   103 	if ((check = AyStarMain_OpenList_IsInList(aystar, current)) != NULL) {
   104 		int i;
   104 		uint i;
   105 		// Yes, check if this g value is lower..
   105 		// Yes, check if this g value is lower..
   106 		if (new_g > check->g) return AYSTAR_DONE;
   106 		if (new_g > check->g) return AYSTAR_DONE;
   107 		aystar->OpenListQueue.del(&aystar->OpenListQueue, check, 0);
   107 		aystar->OpenListQueue.del(&aystar->OpenListQueue, check, 0);
   108 		// It is lower, so change it to this item
   108 		// It is lower, so change it to this item
   109 		check->g = new_g;
   109 		check->g = new_g;