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

Method PointerGotInvalid

src/New/Entity/ShieldClass.cpp:58–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void ShieldClass::PointerGotInvalid(void* ptr, bool removed)
59{
60 auto const abs = static_cast<AbstractClass*>(ptr);
61
62 if (auto const pAnim = abstract_cast<AnimClass*, true>(abs))
63 {
64 if (auto const pAnimExt = AnimExt::ExtMap.Find(pAnim))
65 {
66 if (pAnimExt->IsShieldIdleAnim)
67 {
68 for (auto const pShield : ShieldClass::Array)
69 {
70 if (pAnim == pShield->IdleAnim)
71 {
72 pShield->IdleAnim = nullptr;
73 break; // one anim must be used by less than one shield
74 }
75 }
76 }
77 }
78 }
79}
80
81// =============================
82// load / save

Callers

nothing calls this directly

Calls 1

FindMethod · 0.45

Tested by

no test coverage detected