//
// PlayerObject::playerDestroyed from 0x140397d40 to 0x140397e2c (236 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::postUpdate @ 0x1402e1080
// > PlayLayer::destroyPlayer @ 0x1403b3ca8
// > PlayLayer::destroyPlayer @ 0x1403b3ce4
// > ??> @ 0x1406d647c
//
// 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)
{
const cocos2d::CCPoint *v4; // rax
PlayerFireBoostSprite *m_robotFire; // rcx
if ( a1->m_isDart )
PlayerObject::fadeOutStreak2(a1, 0.2);
PlayerObject::stopDashing(a1);
a1->m_isDead = 1;
*(_WORD *)&a1->m_isRotating = 0;
a1->m_isBallRotating = 0;
a1->m_rotationSpeed = 0.0;
PlayerObject::stopParticles(a1);
v4 = a1->getPosition_0(a1);
cocos2d::CCPoint::operator=(&a1->m_lastPosition, v4);
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 || a2 || a1->m_isHidden )
a1->setOpacity(&a1->cocos2d::CCRGBAProtocol, 0);
else
PlayerObject::playDeathEffect(a1);
}