//
// PlayerObject::playerDestroyed from 0x62cee0 to 0x62cfc8 (232 bytes)
//
// 4 xrefs:
// > PlayLayer::destroyPlayer @ 0x5d1bec
// > PlayLayer::destroyPlayer @ 0x5d204c
// > LevelEditorLayer::postUpdate @ 0x66ec00
// > ??> @ 0x3a5c0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void PlayerObject::playerDestroyed(PlayerObject *a1, bool a2)
{
unsigned int v2; // w20
float v4; // s0
float v5; // s1
PlayerFireBoostSprite *m_robotFire; // x0
v2 = a2;
if ( a1->m_isDart )
PlayerObject::fadeOutStreak2(a1, 0.2);
PlayerObject::stopDashing(a1);
a1->m_isDead = 1;
PlayerObject::stopRotation(a1, 1, 5);
PlayerObject::stopParticles(a1);
v4 = ((float (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
cocos2d::CCPoint::operator=(&a1->m_lastPosition, v4, v5);
m_robotFire = a1->m_robotFire;
if ( m_robotFire )
{
cocos2d::CCNode::stopAllActions(m_robotFire);
a1->m_robotFire->setVisible(a1->m_robotFire, 0);
}
PlayerObject::toggleGhostEffect(a1, (GhostType)0);
PlayerObject::disableSwingFire(a1);
if ( a1->m_playEffects <= v2 || a1->m_isHidden )
a1->setOpacity(a1, 0);
else
PlayerObject::playDeathEffect(a1);
}