aystar.c
changeset 826 fff56bbc3606
parent 193 0a7025304867
child 926 a6d140a6a4de
equal deleted inserted replaced
825:66d2d61e77a8 826:fff56bbc3606
   213  * you should still call clear() yourself!
   213  * you should still call clear() yourself!
   214  */
   214  */
   215 int AyStarMain_Main(AyStar *aystar) {
   215 int AyStarMain_Main(AyStar *aystar) {
   216 	int r, i = 0;
   216 	int r, i = 0;
   217 	// Loop through the OpenList
   217 	// Loop through the OpenList
   218 	//  Quit if result is no AYSTAR_STILL_BUSY or is more then loops_per_tick
   218 	//  Quit if result is no AYSTAR_STILL_BUSY or is more than loops_per_tick
   219 	while ((r = aystar->loop(aystar)) == AYSTAR_STILL_BUSY && (aystar->loops_per_tick == 0 || ++i < aystar->loops_per_tick)) { }
   219 	while ((r = aystar->loop(aystar)) == AYSTAR_STILL_BUSY && (aystar->loops_per_tick == 0 || ++i < aystar->loops_per_tick)) { }
   220 #ifdef AYSTAR_DEBUG
   220 #ifdef AYSTAR_DEBUG
   221 	if (r == AYSTAR_FOUND_END_NODE)
   221 	if (r == AYSTAR_FOUND_END_NODE)
   222 		printf("[AyStar] Found path!\n");
   222 		printf("[AyStar] Found path!\n");
   223 	else if (r == AYSTAR_EMPTY_OPENLIST)
   223 	else if (r == AYSTAR_EMPTY_OPENLIST)