//
// PlayerObject::loadFromCheckpoint from 0x1403a21b0 to 0x1403a3245 (4245 bytes)
//
// 3 xrefs:
// > PlayLayer::loadFromCheckpoint @ 0x1403b7936
// > PlayLayer::loadFromCheckpoint @ 0x1403b7978
// > ??> @ 0x1406d6980
//
// 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
//
// Hidden C++ exception states: #wind=18
void PlayerObject::loadFromCheckpoint(PlayerObject *a1, PlayerCheckpoint *a2)
{
unsigned __int64 v4; // rax
cocos2d::CCArray *m_touchingRings; // rsi
cocos2d::ccArray *data; // rsi
__int64 num; // rax
struct cocos2d::CCObject **arr; // rsi
struct cocos2d::CCObject **i; // rbp
unsigned __int64 v10; // rax
bool v11; // r9
__int64 v12; // r14
__int64 v13; // rsi
GameObject *v14; // rsi
__int64 v15; // r14
__int64 v16; // rax
bool v17; // r8
__int64 v18; // rdx
__int64 v19; // rcx
__int64 v20; // r14
__int64 v21; // r14
GameObject *v22; // rsi
__int64 v23; // rax
bool v24; // r8
__int64 v25; // rdx
__int64 v26; // r14
__int64 v27; // rsi
GameObject *v28; // rsi
__int64 v29; // r14
__int64 v30; // rax
bool v31; // r8
__int64 v32; // rdx
__int64 v33; // r14
__int64 v34; // r14
GameObject *v35; // rsi
__int64 v36; // rax
bool v37; // r8
__int64 v38; // rdx
__int64 v39; // rcx
__int64 v40; // rcx
__int64 v41; // rsi
bool m_jumpBuffered; // al
double m_yVelocityUnrounded; // xmm0_8
double v44; // xmm7_8
std::unordered_set *p_m_ringRelatedSet; // [rsp+50h] [rbp+8h] BYREF
a1->m_maybeReducedEffects = 1;
((void (__fastcall *)(PlayerObject *))a1->setRotation)(a1);
a1->m_wasTeleported = a2->m_wasTeleported;
a1->m_fixGravityBug = a2->m_fixGravityBug;
a1->m_reverseSync = a2->m_reverseSync;
a1->m_yVelocityBeforeSlope = a2->m_yVelocityBeforeSlope;
a1->m_slopeStartTime = a2->m_slopeStartTime;
a1->m_justPlacedStreak = a2->m_justPlacedStreak;
a1->m_lastCollisionBottom = a2->m_lastCollisionBottom;
a1->m_lastCollisionTop = a2->m_lastCollisionTop;
a1->m_lastCollisionLeft = a2->m_lastCollisionLeft;
a1->m_lastCollisionRight = a2->m_lastCollisionRight;
a1->m_unk50C = a2->m_unk50C;
a1->m_unk510 = a2->m_unk510;
a1->m_currentSlope2 = a2->m_currentSlope2;
a1->m_preLastGroundObject = a2->m_preLastGroundObject;
a1->m_slopeAngle = a2->m_slopeAngle;
a1->m_slopeSlidingMaybeRotated = a2->m_slopeSlidingMaybeRotated;
a1->m_quickCheckpointMode = a2->m_quickCheckpointMode;
a1->m_collidedObject = a2->m_collidedObject;
a1->m_lastGroundObject = a2->m_lastGroundObject;
a1->m_collidingWithLeft = a2->m_collidingWithLeft;
a1->m_collidingWithRight = a2->m_collidingWithRight;
a1->m_scaleXRelated2 = a2->m_scaleXRelated2;
a1->m_groundYVelocity = a2->m_groundYVelocity;
a1->m_yVelocityRelated = a2->m_yVelocityRelated;
a1->m_scaleXRelated3 = a2->m_scaleXRelated3;
a1->m_scaleXRelated4 = a2->m_scaleXRelated4;
a1->m_scaleXRelated5 = a2->m_scaleXRelated5;
a1->m_isCollidingWithSlope = a2->m_isCollidingWithSlope;
a1->m_isBallRotating = a2->m_isBallRotating;
a1->m_unk669 = a2->m_unk669;
a1->m_currentPotentialSlope = a2->m_currentPotentialSlope;
a1->m_currentSlope = a2->m_currentSlope;
a1->unk_584 = a2->unk_584;
a1->m_collidingWithSlopeId = a2->m_collidingWithSlopeId;
a1->m_slopeFlipGravityRelated = a2->m_slopeFlipGravityRelated;
a1->m_slopeAngleRadians = a2->m_slopeAngleRadians;
a1->m_rotationSpeed = a2->m_rotationSpeed;
a1->m_rotateSpeed = a2->m_rotateSpeed;
a1->m_isRotating = a2->m_isRotating;
a1->m_isBallRotating2 = a2->m_isBallRotating2;
a1->m_speedMultiplier = a2->m_speedMultiplier;
a1->m_yStart = a2->m_yStart;
a1->m_gravity = a2->m_gravity;
a1->m_trailingParticleLife = a2->m_trailingParticleLife;
a1->m_gameModeChangedTime = a2->m_gameModeChangedTime;
a1->m_padRingRelated = a2->m_padRingRelated;
a1->m_maybeIsFalling = a2->m_maybeIsFalling;
a1->m_shouldTryPlacingCheckpoint = a2->m_shouldTryPlacingCheckpoint;
a1->m_playEffects = a2->m_playEffects;
a1->m_isOnGround3 = a2->m_isOnGround3;
a1->m_lastSpiderFlipTime = a2->m_lastSpiderFlipTime;
a1->m_unkBool5 = a2->m_unkBool5;
a1->m_ringJumpRelated = a2->m_ringJumpRelated;
if ( &a1->m_ringRelatedSet != &a2->m_ringRelatedSet )
{
p_m_ringRelatedSet = &a1->m_ringRelatedSet;
a1->m_ringRelatedSet._Traitsobj._Mypair._Myval2._Myval2 = a2->m_ringRelatedSet._Traitsobj._Mypair._Myval2._Myval2;
sub_140269E60(
(void ****)&a1->m_ringRelatedSet._List,
*(__int64 **)a2->m_ringRelatedSet._List._Mypair._Myval2._Myhead,
(__int64 *)a2->m_ringRelatedSet._List._Mypair._Myval2._Myhead);
v4 = sub_14005F0F0((__int64)&a1->m_ringRelatedSet, a1->m_ringRelatedSet._List._Mypair._Myval2._Mysize);
sub_140062E80(&a1->m_ringRelatedSet._Traitsobj._Mypair._Myval2._Myval2, v4);
}
a1->m_maybeSpriteRelated = a2->m_maybeSpriteRelated;
a1->m_landParticlesAngle = a2->m_landParticlesAngle;
a1->m_landParticleRelatedY = a2->m_landParticleRelatedY;
a1->m_slopeRotation = a2->m_slopeRotation;
a1->m_currentSlopeYVelocity = a2->m_currentSlopeYVelocity;
a1->m_unk3d0 = a2->m_unk3d0;
a1->m_blackOrbRelated = a2->m_blackOrbRelated;
a1->m_unk3e0 = a2->m_unk3e0;
a1->m_unk3e1 = a2->m_unk3e1;
a1->m_isAccelerating = a2->m_isAccelerating;
a1->m_isCurrentSlopeTop = a2->m_isCurrentSlopeTop;
a1->m_collidedTopMinY = a2->m_collidedTopMinY;
a1->m_collidedBottomMaxY = a2->m_collidedBottomMaxY;
a1->m_collidedLeftMaxX = a2->m_collidedLeftMaxX;
a1->m_collidedRightMinX = a2->m_collidedRightMinX;
a1->m_wasJumpBuffered = a2->m_wasJumpBuffered;
a1->m_wasRobotJump = a2->m_wasRobotJump;
a1->m_stateJumpBuffered = a2->m_stateJumpBuffered;
a1->m_stateRingJump2 = a2->m_stateRingJump2;
a1->m_touchedRing = a2->m_touchedRing;
a1->m_touchedCustomRing = a2->m_touchedCustomRing;
a1->m_touchedGravityPortal = a2->m_touchedGravityPortal;
a1->m_maybeTouchedBreakableBlock = a2->m_maybeTouchedBreakableBlock;
a1->m_touchedPad = a2->m_touchedPad;
a1->m_yVelocity = a2->m_yVelocity;
a1->m_fallSpeed = a2->m_fallSpeed;
a1->m_maybeUpsideDownSlope = a2->m_maybeUpsideDownSlope;
a1->m_reverseRelated = a2->m_reverseRelated;
a1->m_maybeReverseAcceleration = a2->m_maybeReverseAcceleration;
a1->m_xVelocityRelated2 = a2->m_xVelocityRelated2;
cocos2d::CCPoint::operator=(&a1->m_shipRotation, &a2->m_shipRotation);
cocos2d::CCPoint::operator=(&a1->m_lastPortalPos, &a2->m_lastPortalPos);
a1->m_unkUnused3 = a2->m_unkUnused3;
a1->m_isOnGround2 = a2->m_isOnGround2;
a1->m_lastLandTime = a2->m_lastLandTime;
a1->m_platformerVelocityRelated = a2->m_platformerVelocityRelated;
a1->m_maybeIsBoosted = a2->m_maybeIsBoosted;
a1->m_scaleXRelatedTime = a2->m_scaleXRelatedTime;
a1->m_isLocked = a2->m_isLocked;
a1->m_controlsDisabled = a2->m_controlsDisabled;
cocos2d::CCPoint::operator=(&a1->m_lastGroundedPos, &a2->m_lastGroundedPos);
cocos2d::CCArray::removeAllObjects(a1->m_touchingRings);
m_touchingRings = a2->m_touchingRings;
if ( m_touchingRings )
{
data = m_touchingRings->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
if ( !*arr )
break;
cocos2d::CCArray::addObject(a1->m_touchingRings, *arr);
}
}
}
if ( &a1->m_touchedRings != &a2->m_touchedRings )
{
p_m_ringRelatedSet = &a1->m_touchedRings;
a1->m_touchedRings._Traitsobj._Mypair._Myval2._Myval2 = a2->m_touchedRings._Traitsobj._Mypair._Myval2._Myval2;
sub_140269E60(
(void ****)&a1->m_touchedRings._List,
*(__int64 **)a2->m_touchedRings._List._Mypair._Myval2._Myhead,
(__int64 *)a2->m_touchedRings._List._Mypair._Myval2._Myhead);
v10 = sub_14005F0F0((__int64)&a1->m_touchedRings, a1->m_touchedRings._List._Mypair._Myval2._Mysize);
sub_140062E80(&a1->m_touchedRings._Traitsobj._Mypair._Myval2._Myval2, v10);
}
a1->m_lastActivatedPortal = a2->m_lastActivatedPortal;
a1->m_totalTime = a2->m_totalTime;
a1->m_yVelocityRelated3 = a2->m_yVelocityRelated3;
a1->m_defaultMiniIcon = a2->m_defaultMiniIcon;
a1->m_swapColors = a2->m_swapColors;
a1->m_switchDashFireColor = a2->m_switchDashFireColor;
a1->m_stateOnGround = a2->m_stateOnGround;
*(_DWORD *)&a1->m_stateUnk = *(_DWORD *)&a2->m_stateUnk;
a1->m_stateBoostX = a2->m_stateBoostX;
a1->m_stateBoostY = a2->m_stateBoostY;
a1->m_maybeStateForce2 = a2->m_maybeStateForce2;
a1->m_stateScale = a2->m_stateScale;
a1->m_platformerXVelocity = a2->m_platformerXVelocity;
a1->m_holdingRight = a2->m_holdingRight;
a1->m_holdingLeft = a2->m_holdingLeft;
a1->m_leftPressedFirst = a2->m_leftPressedFirst;
a1->m_scaleXRelated = a2->m_scaleXRelated;
a1->m_maybeHasStopped = a2->m_maybeHasStopped;
a1->m_xVelocityRelated = a2->m_xVelocityRelated;
a1->m_maybeGoingCorrectSlopeDirection = a2->m_maybeGoingCorrectSlopeDirection;
a1->m_isSliding = a2->m_isSliding;
a1->m_maybeSlopeForce = a2->m_maybeSlopeForce;
a1->m_isOnIce = a2->m_isOnIce;
a1->m_physDeltaRelated = a2->m_physDeltaRelated;
a1->m_isOnGround4 = a2->m_isOnGround4;
a1->m_maybeSlidingTime = a2->m_maybeSlidingTime;
a1->m_maybeSlidingStartTime = a2->m_maybeSlidingStartTime;
a1->m_changedDirectionsTime = a2->m_changedDirectionsTime;
a1->m_slopeEndTime = a2->m_slopeEndTime;
a1->m_isMoving = a2->m_isMoving;
a1->m_platformerMovingLeft = a2->m_platformerMovingLeft;
a1->m_platformerMovingRight = a2->m_platformerMovingRight;
a1->m_isSlidingRight = a2->m_isSlidingRight;
a1->m_maybeChangedDirectionAngle = a2->m_maybeChangedDirectionAngle;
a1->m_unkUnused2 = a2->m_unkUnused2;
a1->m_stateNoAutoJump = a2->m_stateNoAutoJump;
a1->m_stateDartSlide = a2->m_stateDartSlide;
a1->m_stateHitHead = a2->m_stateHitHead;
a1->m_stateFlipGravity = a2->m_stateFlipGravity;
a1->m_stateForce = a2->m_stateForce;
cocos2d::CCPoint::operator=(&a1->m_stateForceVector, &a2->m_stateForceVector);
a1->m_affectedByForces = a2->m_affectedByForces;
sub_140265350(
&a1->m_jumpPadRelated._Mypair._Myval2._Myval2._Myhead,
&a2->m_jumpPadRelated._Mypair._Myval2._Myval2._Myhead);
a1->m_fallStartY = a2->m_fallStartY;
PlayerObject::toggleVisibility(a1, !a2->m_isHidden);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_m_ringRelatedSet);
a1->setPosition_0(a1, (const cocos2d::CCPoint *)&p_m_ringRelatedSet);
PlayerObject::flipGravity(a1, a2->m_isUpsideDown, 0);
a1->m_isSideways = a2->m_isSideways;
PlayerObject::updatePlayerArt(a1);
a1->m_gravityMod = a2->m_gravityMod;
PlayerObject::toggleGhostEffect(a1, a2->m_ghostType);
PlayerObject::togglePlayerScale(a1, a2->m_isMini, 0);
a1->m_maybeReverseSpeed = a2->m_maybeReverseSpeed;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_m_ringRelatedSet);
cocos2d::CCPoint::operator=(&a1->m_lastPosition, &p_m_ringRelatedSet);
a1->m_objectSnappedTo = a2->m_objectSnappedTo;
a1->m_snapDistance = a2->m_snapDistance;
a1->m_accelerationOrSpeed = a2->m_accelerationOrSpeed;
a1->m_unk838 = a2->m_unk838;
a1->m_followRelated = a2->m_followRelated;
if ( &a1->m_playerFollowFloats != &a2->m_playerFollowFloats )
sub_1403A4250(
&a1->m_playerFollowFloats,
a2->m_playerFollowFloats._Mypair._Myval2._Myfirst,
a2->m_playerFollowFloats._Mypair._Myval2._Mylast - a2->m_playerFollowFloats._Mypair._Myval2._Myfirst);
a1->m_wasOnSlope = a2->m_wasOnSlope;
a1->m_isOnSlope = a2->m_isOnSlope;
a1->m_slopeVelocity = a2->m_slopeVelocity;
if ( a2->m_isGoingLeft )
PlayerObject::doReversePlayer(a1, 1);
PlayerObject::updateTimeMod(a1, a2->m_playerSpeed, 0);
if ( a2->m_isShip )
{
v12 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v12 = qword_1406C2ED8;
}
v13 = v12;
if ( !v12 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v12 = qword_1406C2ED8;
}
v14 = *(GameObject **)(*(_QWORD *)(v13 + 520) + 1024LL);
v15 = *(_QWORD *)(v12 + 520);
PlayerObject::switchedToMode(a1, ShipPortal);
if ( v14 )
{
v14->getPosition_0(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_m_ringRelatedSet);
cocos2d::CCPoint::operator=(&a1->m_lastPortalPos, v16);
a1->m_lastActivatedPortal = v14;
}
if ( *(_BYTE *)(v15 + 1058) && *(_QWORD *)(v15 + 1032) )
{
v14 = *(GameObject **)(v15 + 1032);
}
else if ( !v14 )
{
goto LABEL_27;
}
*(_QWORD *)(v15 + 1024) = v14;
if ( v14->m_hasNoEffects )
{
v17 = 1;
LABEL_28:
PlayerObject::toggleFlyMode(a1, 1, v17);
LOBYTE(v18) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 1120LL))(v15, v18);
goto LABEL_84;
}
LABEL_27:
v17 = 0;
goto LABEL_28;
}
if ( a2->m_isBall )
{
v19 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v19 = qword_1406C2ED8;
}
GJBaseGameLayer::switchToRollMode(
*(GJBaseGameLayer **)(v19 + 520),
a1,
*(GameObject **)(*(_QWORD *)(v19 + 520) + 1024LL),
v11);
goto LABEL_84;
}
if ( a2->m_isBird )
{
v20 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v20 = qword_1406C2ED8;
}
v21 = *(_QWORD *)(v20 + 520);
v22 = *(GameObject **)(v21 + 1024);
PlayerObject::switchedToMode(a1, UfoPortal);
if ( v22 )
{
v22->getPosition_0(v22);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_m_ringRelatedSet);
cocos2d::CCPoint::operator=(&a1->m_lastPortalPos, v23);
a1->m_lastActivatedPortal = v22;
}
if ( *(_BYTE *)(v21 + 1058) && *(_QWORD *)(v21 + 1032) )
{
v22 = *(GameObject **)(v21 + 1032);
}
else if ( !v22 )
{
goto LABEL_44;
}
*(_QWORD *)(v21 + 1024) = v22;
if ( v22->m_hasNoEffects )
{
v24 = 1;
LABEL_45:
PlayerObject::toggleBirdMode(a1, 1, v24);
LOBYTE(v25) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 1120LL))(v21, v25);
goto LABEL_84;
}
LABEL_44:
v24 = 0;
goto LABEL_45;
}
if ( a2->m_isSwing )
{
v26 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v26 = qword_1406C2ED8;
}
v27 = v26;
if ( !v26 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v26 = qword_1406C2ED8;
}
v28 = *(GameObject **)(*(_QWORD *)(v27 + 520) + 1024LL);
v29 = *(_QWORD *)(v26 + 520);
PlayerObject::switchedToMode(a1, SwingPortal);
if ( v28 )
{
v28->getPosition_0(v28);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_m_ringRelatedSet);
cocos2d::CCPoint::operator=(&a1->m_lastPortalPos, v30);
a1->m_lastActivatedPortal = v28;
}
if ( *(_BYTE *)(v29 + 1058) && *(_QWORD *)(v29 + 1032) )
{
v28 = *(GameObject **)(v29 + 1032);
}
else if ( !v28 )
{
goto LABEL_59;
}
*(_QWORD *)(v29 + 1024) = v28;
if ( v28->m_hasNoEffects )
{
v31 = 1;
LABEL_60:
PlayerObject::toggleSwingMode(a1, 1, v31);
LOBYTE(v32) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v29 + 1120LL))(v29, v32);
goto LABEL_84;
}
LABEL_59:
v31 = 0;
goto LABEL_60;
}
if ( a2->m_isDart )
{
v33 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v33 = qword_1406C2ED8;
}
v34 = *(_QWORD *)(v33 + 520);
v35 = *(GameObject **)(v34 + 1024);
PlayerObject::switchedToMode(a1, WavePortal);
if ( v35 )
{
v35->getPosition_0(v35);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_m_ringRelatedSet);
cocos2d::CCPoint::operator=(&a1->m_lastPortalPos, v36);
a1->m_lastActivatedPortal = v35;
}
if ( *(_BYTE *)(v34 + 1058) && *(_QWORD *)(v34 + 1032) )
{
v35 = *(GameObject **)(v34 + 1032);
}
else if ( !v35 )
{
goto LABEL_72;
}
*(_QWORD *)(v34 + 1024) = v35;
if ( v35->m_hasNoEffects )
{
v37 = 1;
LABEL_73:
PlayerObject::toggleDartMode(a1, 1, v37);
LOBYTE(v38) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v34 + 1120LL))(v34, v38);
goto LABEL_84;
}
LABEL_72:
v37 = 0;
goto LABEL_73;
}
if ( a2->m_isRobot )
{
v39 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v39 = qword_1406C2ED8;
}
GJBaseGameLayer::switchToRobotMode(
*(GJBaseGameLayer **)(v39 + 520),
a1,
*(GameObject **)(*(_QWORD *)(v39 + 520) + 1024LL),
v11);
}
else if ( a2->m_isSpider )
{
v40 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v40 = qword_1406C2ED8;
}
v41 = v40;
if ( !v40 )
{
p_m_ringRelatedSet = (std::unordered_set *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)p_m_ringRelatedSet);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v40 = qword_1406C2ED8;
}
GJBaseGameLayer::switchToSpiderMode(
*(GJBaseGameLayer **)(v40 + 520),
a1,
*(GameObject **)(*(_QWORD *)(v41 + 520) + 1024LL),
v11);
}
LABEL_84:
PlayerObject::resetStreak(a1);
m_jumpBuffered = a2->m_jumpBuffered;
a1->m_jumpBuffered = m_jumpBuffered;
if ( m_jumpBuffered && a2->m_isDashing )
{
a1->m_dashX = a2->m_dashX;
a1->m_dashY = a2->m_dashY;
a1->m_dashAngle = a2->m_dashAngle;
a1->m_dashRing = a2->m_dashRing;
a1->m_dashStartTime = a2->m_dashStartTime;
PlayerObject::startDashing(a1, nullptr);
}
m_yVelocityUnrounded = a2->m_yVelocityUnrounded;
v44 = (double)(int)m_yVelocityUnrounded;
if ( m_yVelocityUnrounded != v44 )
m_yVelocityUnrounded = round((m_yVelocityUnrounded - v44) * 1000.0) / 1000.0 + v44;
a1->m_yVelocity = m_yVelocityUnrounded;
a1->m_isOnGround = a2->m_isOnGround;
a1->m_lastFlipTime = a2->m_lastFlipTime;
a1->m_decreaseBoostSlide = a2->m_decreaseBoostSlide;
if ( a2->m_platformerCheckpoint )
{
PlayerObject::releaseAllButtons(a1);
a1->m_yVelocity = 0.0;
a1->m_platformerXVelocity = 0.0;
a1->m_isOnGround = 0;
}
((void (__fastcall *)(PlayerObject *))a1->setRotation)(a1);
a1->m_maybeReducedEffects = 0;
if ( a1->m_isPlatformer )
PlayerObject::releaseAllButtons(a1);
}