| 645 | } |
| 646 | |
| 647 | static inline bool AIPathAddDPathNode(ai_path_info *aip, int *slot, int *cur_node, vector *pos, int room, int handle) { |
| 648 | int status; |
| 649 | |
| 650 | if (*cur_node == MAX_NODES) { |
| 651 | status = AIPathAddDPath(aip, handle); |
| 652 | if (!status) |
| 653 | Int3(); // chrishack -- out of dynamic paths |
| 654 | |
| 655 | AIDynamicPath[*slot].num_nodes = MAX_NODES; |
| 656 | *cur_node = 0; |
| 657 | *slot = aip->path_id[aip->num_paths - 1]; |
| 658 | } |
| 659 | |
| 660 | AIDynamicPath[*slot].pos[*cur_node] = *pos; |
| 661 | AIDynamicPath[*slot].roomnum[(*cur_node)++] = room; |
| 662 | |
| 663 | aip->path_end_node[aip->num_paths - 1] = *cur_node - 1; |
| 664 | |
| 665 | return true; |
| 666 | } |
| 667 | |
| 668 | static bool AIGenerateAltBNodePath(object *obj, vector *start_pos, int *start_room, vector *end_pos, int *end_room, |
| 669 | ai_path_info *aip, int *slot, int *cur_node, int handle) { |
no test coverage detected