equal
deleted
inserted
replaced
695 /* GO! */ |
695 /* GO! */ |
696 r = AyStarMain_Main(&_npf_aystar); |
696 r = AyStarMain_Main(&_npf_aystar); |
697 assert(r != AYSTAR_STILL_BUSY); |
697 assert(r != AYSTAR_STILL_BUSY); |
698 |
698 |
699 if (result.best_bird_dist != 0) { |
699 if (result.best_bird_dist != 0) { |
700 if (target) { |
700 if (target != NULL) { |
701 DEBUG(misc, 1) ("NPF: Could not find route to 0x%x from 0x%x.", target->dest_coords, start1->tile); |
701 DEBUG(npf, 1) ("Could not find route to tile 0x%x from 0x%x.", target->dest_coords, start1->tile); |
702 } else { |
702 } else { |
703 /* Assumption: target == NULL, so we are looking for a depot */ |
703 /* Assumption: target == NULL, so we are looking for a depot */ |
704 DEBUG(misc, 1) ("NPF: Could not find route to a depot from 0x%x.", start1->tile); |
704 DEBUG(npf, 1) ("Could not find route to a depot from tile 0x%x.", start1->tile); |
705 } |
705 } |
706 |
706 |
707 } |
707 } |
708 return result; |
708 return result; |
709 } |
709 } |
847 /* This depot is closer */ |
847 /* This depot is closer */ |
848 if (result.best_path_dist < best_result.best_path_dist) |
848 if (result.best_path_dist < best_result.best_path_dist) |
849 best_result = result; |
849 best_result = result; |
850 } |
850 } |
851 if (result.best_bird_dist != 0) { |
851 if (result.best_bird_dist != 0) { |
852 DEBUG(misc, 1) ("NPF: Could not find route to any depot from 0x%x.", tile); |
852 DEBUG(npf, 1) ("Could not find route to any depot from tile 0x%x.", tile); |
853 } |
853 } |
854 return best_result; |
854 return best_result; |
855 } |
855 } |
856 |
856 |
857 void InitializeNPF(void) |
857 void InitializeNPF(void) |