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

Function UnattachChildren

Descent3/attach.cpp:687–703  ·  view source on GitHub ↗

Unattaches all children from a parent object

Source from the content-addressed store, hash-verified

685
686// Unattaches all children from a parent object
687bool UnattachChildren(object *parent) {
688 poly_model *parent_pm = &Poly_models[parent->rtype.pobj_info.model_num];
689 int i;
690
691 if (!parent->attach_children)
692 return false;
693
694 for (i = 0; i < parent_pm->n_attach; i++) {
695 object *child;
696
697 if ((child = ObjGet(parent->attach_children[i])) != NULL) {
698 UnattachFromParent(child);
699 }
700 }
701
702 return true;
703}

Callers 3

osipf_UnattachChildrenFunction · 0.85
dUnattachChildrenFunction · 0.85
ObjDeleteDeadFunction · 0.85

Calls 2

ObjGetFunction · 0.85
UnattachFromParentFunction · 0.85

Tested by

no test coverage detected