MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / xModelInstanceFree

Function xModelInstanceFree

src/SB/Core/x/xModel.cpp:217–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void xModelInstanceFree(xModelInstance* model)
218{
219 xModelInstance* prev;
220 xModelInstance* curr;
221
222 while (prev = FindChild(model), prev != NULL)
223 {
224 xModelInstanceFree(prev);
225 }
226 prev = model->Parent;
227 if (prev != NULL)
228 {
229 for (curr = prev->Next; (curr != NULL) && (curr != model); curr = curr->Next)
230 {
231 prev = curr;
232 }
233 prev->Next = curr->Next;
234 }
235 if (model->Anim != NULL)
236 {
237 xAnimPoolFree(model->Anim);
238 model->Anim = NULL;
239 }
240 if (model->Pool != NULL)
241 {
242 model->Next = model->Pool->List;
243 model->Pool->List = model;
244 }
245}
246
247void xModelInstanceAttach(xModelInstance* inst, xModelInstance* parent)
248{

Callers 8

KillMethod · 0.50
FreeModelMethod · 0.50
kill_ringMethod · 0.50
SwapModelFunction · 0.50
zShrapnel_ResetFunction · 0.50
zFrag_DeleteProjectileFunction · 0.50
DestroyMethod · 0.50
ProcessMethod · 0.50

Calls 2

FindChildFunction · 0.85
xAnimPoolFreeFunction · 0.70

Tested by

no test coverage detected