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

Function AIPathAddStaticPath

Descent3/aipath.cpp:629–645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629static bool AIPathAddStaticPath(ai_path_info *aip, int path_id, int start_index, int end_index) {
630 // chrishack -- validation code is needed
631
632 if (aip->num_paths >= MAX_JOINED_PATHS) {
633 mprintf(0, "AI ERROR: Tried to join too many paths (Adding spath)\n");
634 return false;
635 }
636
637 aip->path_id[aip->num_paths] = path_id;
638 aip->path_type[aip->num_paths] = AIP_STATIC;
639 aip->path_start_node[aip->num_paths] = start_index;
640 aip->path_end_node[aip->num_paths] = end_index;
641
642 aip->num_paths++;
643
644 return true;
645}
646
647static inline bool AIPathAddDPathNode(ai_path_info *aip, int *slot, int *cur_node, vector *pos, int room, int handle) {
648 int status;

Callers 1

AIPathSetAsStaticPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected