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

Function xParGroupKillPar

src/SB/Core/x/xParGroup.cpp:246–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void xParGroupKillPar(xParGroup* ps, xPar* p)
247{
248 if (p == ps->m_root)
249 {
250 ps->m_root = p->m_next;
251
252 if (ps->m_root)
253 {
254 ps->m_root->m_prev = NULL;
255 }
256
257 p->m_next = NULL;
258 p->m_prev = NULL;
259 }
260 else
261 {
262 if (p->m_next)
263 {
264 p->m_next->m_prev = p->m_prev;
265 }
266
267 if (p->m_prev)
268 {
269 p->m_prev->m_next = p->m_next;
270 }
271
272 p->m_prev = NULL;
273 p->m_next = NULL;
274 }
275
276 ps->m_num_of_particles--;
277
278 if (ps->m_flags & XPARGROUP_ALLOCPARS)
279 {
280 xParFree(p);
281 }
282 else
283 {
284 xParGroupAddParToDeadList(ps, p);
285 }
286}
287
288void xParGroupAddParToDeadList(xParGroup* ps, xPar* p)
289{

Callers 4

xParGroupAnimateFunction · 0.85
xParGroupAddParFunction · 0.85
xParEmitterEmitFunction · 0.85

Calls 2

xParFreeFunction · 0.85

Tested by

no test coverage detected