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

Function EBNode_AutoEdgeNode

editor/ebnode.cpp:830–860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828}
829
830void EBNode_AutoEdgeNode(int spnt, int sroom) {
831 BNode_verified = false;
832
833 bn_list *snlist;
834 snlist = BNode_GetBNListPtr(sroom);
835
836 int i;
837
838 for (i = 0; i < snlist->num_nodes; i++) {
839 if (i != spnt) {
840 fvi_info hit_info;
841 fvi_query fq;
842
843 // check to make sure it is still in the room and valid
844 fq.p0 = &snlist->nodes[spnt].pos;
845 fq.p1 = &snlist->nodes[i].pos;
846 fq.startroom = (sroom > Highest_room_index && sroom <= Highest_room_index + 8)
847 ? GetTerrainRoomFromPos(&snlist->nodes[spnt].pos)
848 : sroom;
849
850 fq.rad = 3.0f;
851 fq.flags = FQ_NO_RELINK;
852 fq.thisobjnum = -1;
853 fq.ignore_obj_list = NULL;
854
855 if (fvi_FindIntersection(&fq, &hit_info) == HIT_NONE) {
856 EBNode_AddEdge(spnt, sroom, i, sroom);
857 }
858 }
859 }
860}
861
862void EBNode_AddEdge(int spnt, int sroom, int epnt, int eroom, bool f_add_reverse, float computed_max_rad) {
863 int i;

Callers 3

OnAinAutoEdgeNodeMethod · 0.85
OnAerButtonMethod · 0.85
EBNode_VerifyGraphFunction · 0.85

Calls 4

BNode_GetBNListPtrFunction · 0.85
GetTerrainRoomFromPosFunction · 0.85
fvi_FindIntersectionFunction · 0.85
EBNode_AddEdgeFunction · 0.85

Tested by

no test coverage detected