MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / InvalidateParticleSystemPointers

Method InvalidateParticleSystemPointers

src/Ext/Anim/Body.cpp:421–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void AnimExt::InvalidateParticleSystemPointers(ParticleSystemClass* pParticleSystem)
422{
423 for (auto const& pAnim : AnimExt::AnimsWithAttachedParticles)
424 {
425 auto const pExt = AnimExt::ExtMap.Find(pAnim);
426
427 if (!pExt)
428 continue; // Skip animation, chances are it is a null type anim in process of being removed.
429
430 if (pExt->AttachedSystem == pParticleSystem)
431 {
432 pExt->AttachedSystem = nullptr;
433
434 auto& vec = AnimExt::AnimsWithAttachedParticles;
435 vec.erase(std::remove(vec.begin(), vec.end(), pAnim), vec.end());
436 }
437 }
438}
439
440// =============================
441// container

Callers

nothing calls this directly

Calls 4

eraseMethod · 0.80
FindMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected