MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AIPathAddDPathNode

Function AIPathAddDPathNode

Descent3/aipath.cpp:647–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

645}
646
647static 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
668static 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) {

Callers 5

AIGenerateAltBNodePathFunction · 0.85
AIGenerateAltBOAPathFunction · 0.85
AIGenerateBNodePathFunction · 0.85
AIGenerateBOAPathFunction · 0.85
AIPathAllocPathFunction · 0.85

Calls 1

AIPathAddDPathFunction · 0.85

Tested by

no test coverage detected