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

Function AIPathAddDPath

Descent3/aipath.cpp:603–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603static bool AIPathAddDPath(ai_path_info *aip, int handle) {
604 int slot;
605 bool status;
606
607 if (aip->num_paths >= MAX_JOINED_PATHS) {
608 mprintf(0, "AI ERROR: Tried to join too many paths (Adding dpath)\n");
609 return false;
610 }
611
612 status = AIPathGetDPathSlot(&slot, handle);
613
614 if (status) {
615 aip->path_id[aip->num_paths] = slot;
616 aip->path_type[aip->num_paths] = AIP_DYNAMIC;
617
618 aip->path_start_node[aip->num_paths] = 0;
619 aip->path_end_node[aip->num_paths] = 0;
620
621 aip->path_flags[aip->num_paths] = 0;
622
623 aip->num_paths++;
624 }
625
626 return status;
627}
628
629static bool AIPathAddStaticPath(ai_path_info *aip, int path_id, int start_index, int end_index) {
630 // chrishack -- validation code is needed

Callers 2

AIPathAddDPathNodeFunction · 0.85
AIPathAllocPathFunction · 0.85

Calls 1

AIPathGetDPathSlotFunction · 0.85

Tested by

no test coverage detected