//
// PlayerObject::collidedWithSlopeInternal from 0x1002206f4 to 0x100221800 (4364 bytes)
//
// 2 xrefs:
// > PlayerObject::collidedWithSlope @ 0x1002202f0
// > PlayerObject::handleRotatedCollisionInternal @ 0x100220490
//
// 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 __fastcall PlayerObject::collidedWithSlopeInternal(PlayerObject *a1, float a2, GameObject *a3, bool a4)
{
__int64 v8; // x0
double v9; // d0
__int64 v10; // x0
int m_slopeUphill; // w23
int v12; // w26
int v13; // w21
float32x2_t *LastPosition; // x0
float v15; // s2
float v16; // s13
double v17; // d11
double v18; // d0
double v19; // d14
int m_isUpsideDown; // w9
char v21; // w28
int v22; // w25
float m_slopeVelocity; // s1
int m_isCurrentSlopeTop; // w10
float v25; // s0
float v26; // s10
float v27; // s0
float v28; // s1
float v29; // s12
float32x2_t *v30; // x23
float32x2_t *v31; // x8
float v32; // s0
_BOOL4 v33; // w23
_BOOL4 v34; // w27
float v35; // s0
float v36; // s1
float v37; // s1
float v38; // s9
float m_slopeRotation; // s0
float v40; // s9
float v41; // s0
float v42; // s1
float v43; // s0
float v44; // s9
double v45; // d8
float v46; // s14
__int64 *v47; // x0
unsigned __int32 v48; // s10
float v49; // s11
float SlopeAngle; // s0
float v51; // s13
float v52; // s15
float v53; // s0
float v54; // s13
int v55; // w23
double v56; // d14
float v57; // s9
__n128 v58; // q0
float v59; // s1
float v60; // s1
float v61; // s0
_BOOL4 v62; // w10
float v63; // s1
bool m_isOnSlope; // w8
float v65; // s1
float v66; // s0
_BOOL4 v67; // w10
bool v68; // w9
char v69; // w8
char v70; // w9
_BOOL4 v71; // w8
_BOOL4 v72; // w9
bool m_isPlatformer; // w9
char v74; // w24
char m_wasOnSlope; // w27
bool v76; // w28
_BOOL4 v77; // w22
_BOOL4 v78; // w9
_BOOL4 v79; // w8
float v80; // s11
double v81; // d12
GameManager *v82; // x0
int v83; // w8
double v84; // d9
__int64 *v85; // x0
float v86; // s0
__n128 v87; // q0
__n128 v88; // q1
double m_yVelocity; // d1
double v90; // d0
double v91; // d1
float v92; // s10
_BOOL4 v93; // w8
double v94; // d0
double v95; // d1
double m_platformerXVelocity; // d0
float v97; // s0
int v98; // w8
__int64 *v99; // x0
float v100; // s0
float v101; // s0
float v102; // s1
float v103; // s2
float v104; // s3
_BOOL4 v105; // w8
bool v106; // w8
double v107; // d1
double v108; // d0
double v109; // d1
double v110; // d1
double v111; // d0
double v112; // d1
float v113; // s2
float v114; // s0
float v115; // s0
double v116; // d1
double v117; // d0
float v118; // s0
float v119; // s0
double m_gameModeChangedTime; // d1
double m_lastFlipTime; // d1
__n128 v122; // q0
__n128 v123; // q1
double v124; // d1
double v125; // d0
double v126; // d1
float v127; // [xsp+Ch] [xbp-114h]
int v128; // [xsp+10h] [xbp-110h]
char v129; // [xsp+14h] [xbp-10Ch]
double v130; // [xsp+18h] [xbp-108h]
float v131; // [xsp+20h] [xbp-100h]
float v132; // [xsp+24h] [xbp-FCh]
_BOOL4 v133; // [xsp+28h] [xbp-F8h]
_BOOL4 v134; // [xsp+2Ch] [xbp-F4h]
__int64 v135; // [xsp+30h] [xbp-F0h] BYREF
__int64 v136; // [xsp+38h] [xbp-E8h] BYREF
__int64 v137; // [xsp+40h] [xbp-E0h] BYREF
float32x2_t v138[2]; // [xsp+48h] [xbp-D8h] BYREF
float32x2_t v139; // [xsp+58h] [xbp-C8h] BYREF
float32x2_t v140; // [xsp+60h] [xbp-C0h] BYREF
__int64 v141; // [xsp+68h] [xbp-B8h] BYREF
float v142; // [xsp+70h] [xbp-B0h]
float v143; // [xsp+74h] [xbp-ACh]
__int64 v144; // [xsp+78h] [xbp-A8h] BYREF
float v145; // [xsp+80h] [xbp-A0h]
float v146; // [xsp+84h] [xbp-9Ch]
if ( !a4 && PlayerObject::preSlopeCollision(a1, a2, a3) )
return;
v8 = ((__int64 (__fastcall *)(PlayerObject *))a1->getObjectRect)(a1);
v9 = sub_100022B98(&v144, v8);
v10 = ((__int64 (__fastcall *)(GameObject *, double))a3->getObjectRect)(a3, v9);
sub_100022B98(&v141, v10);
m_slopeUphill = !a3->m_slopeUphill;
if ( a1->m_isPlatformer )
{
if ( a1->m_platformerXVelocity >= 0.0 )
{
LABEL_5:
v12 = 0;
goto LABEL_8;
}
}
else if ( !a1->m_isGoingLeft )
{
goto LABEL_5;
}
v12 = 1;
m_slopeUphill = a3->m_slopeUphill;
LABEL_8:
v13 = GameObject::slopeFloorTop(a3);
((void (__fastcall *)(float32x2_t *__return_ptr, GameObject *))a3->getRealPosition)(v138, a3);
LastPosition = (float32x2_t *)GameObject::getLastPosition(a3);
sub_1000229F0(v138, LastPosition, &v140);
if ( a1->m_isSideways )
v15 = v140.f32[1];
else
v15 = v140.f32[0];
if ( a1->m_isSideways )
v16 = v140.f32[0];
else
v16 = v140.f32[1];
v17 = v15;
v18 = a1->m_speedMultiplier * a1->m_playerSpeed;
v19 = v18 * a2;
m_isUpsideDown = a1->m_isUpsideDown;
if ( v19 >= v15 )
{
v21 = 0;
}
else
{
v21 = m_slopeUphill ^ m_isUpsideDown;
m_slopeUphill ^= 1u;
}
v22 = m_slopeUphill ^ (m_isUpsideDown != a1->m_isSideways);
if ( !a1->m_wasOnSlope )
{
v27 = v142 / v18;
v26 = v143 / v27;
goto LABEL_27;
}
m_slopeVelocity = a1->m_slopeVelocity;
if ( (m_isUpsideDown & 1) != 0 )
m_slopeVelocity = -m_slopeVelocity;
if ( ((m_slopeVelocity > 0.0) & (unsigned __int8)v22) != 1
|| (m_isCurrentSlopeTop = a1->m_isCurrentSlopeTop, m_isCurrentSlopeTop != v13)
|| m_isCurrentSlopeTop != m_isUpsideDown )
{
v25 = v142 / v18;
v26 = v143 / v25;
if ( m_slopeVelocity <= 0.0 || a1->m_currentSlopeYVelocity <= v26 )
{
LABEL_27:
v28 = 0.0;
if ( (v22 & 1) != 0 )
v28 = 4.0;
if ( a1->m_wasOnSlope )
v29 = v28;
else
v29 = (float)(v22 & 1);
v30 = (float32x2_t *)GameObject::getLastPosition(a3);
((void (__fastcall *)(float32x2_t *__return_ptr, GameObject *))a3->getRealPosition)(v138, a3);
sub_1000229F0(v30, v138, &v139);
if ( a1->m_isSideways )
v31 = &v139;
else
v31 = (float32x2_t *)((char *)&v139 + 4);
v32 = v31->f32[0];
v33 = a1->m_isUpsideDown;
if ( v33 || v32 <= 0.0 )
{
v34 = v32 < 0.0 && a1->m_isUpsideDown;
if ( !a4 && !v34 )
goto LABEL_48;
}
else
{
LOBYTE(v34) = 1;
}
v35 = fabsf(v32);
v36 = 5.0;
if ( a1->m_isPlatformer )
v36 = 10.0;
v37 = v36 * a2;
if ( v35 > v37 )
v35 = v37;
v29 = v29 + v35;
LABEL_48:
v38 = v146 * 0.5;
m_slopeRotation = a1->m_slopeRotation;
v40 = v38 / cosf(m_slopeRotation);
v41 = *(float *)(((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1) + 4);
v42 = v29 + (float)(v40 + v41);
v43 = (float)(v41 - v40) - v29;
if ( v33 )
v43 = v42;
if ( a1->m_wasOnSlope )
{
if ( a1->m_isUpsideDown )
{
if ( v43 < *((float *)&v141 + 1) )
return;
}
else if ( v43 > (float)(*((float *)&v141 + 1) + v143) )
{
return;
}
}
else
{
sub_100022990((float *)v138, *(float *)&v141, *((float *)&v141 + 1) + 1.0, v142, v143 + -2.0);
if ( !sub_100022CB0((float *)&v144, (float *)v138) )
return;
}
v44 = a2;
v45 = v19;
v46 = v16;
v130 = v17;
v132 = v26;
v47 = (__int64 *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
sub_1000229B8(&v137, v47);
*(float *)&v48 = sub_100022C58((__int64)&v141);
v49 = sub_100022C48((__int64)&v141);
SlopeAngle = GameObject::getSlopeAngle(a3);
v51 = v146;
v131 = SlopeAngle;
v52 = 0.0;
v53 = v51 / cosf(SlopeAngle);
v127 = v44;
if ( a1->m_wasOnSlope )
{
v54 = v46;
if ( a1->m_collidingWithSlopeId != a3->m_uniqueID )
{
v56 = v45;
if ( a1->m_isCurrentSlopeTop == v13 )
{
v55 = 0;
}
else
{
if ( !a1->m_isPlatformer )
v52 = a1->m_vehicleSize * 20.0;
v55 = 1;
}
LABEL_62:
v57 = v53 * 0.5;
v58.n128_f64[0] = GameObject::slopeYPos(a3, *(float *)&v137);
v58.n128_f32[0] = v58.n128_f64[0];
v59 = v146 * 0.5;
v129 = v21;
if ( (v13 & 1) != 0 )
{
v60 = v52 + (float)(*(float *)&v48 - v59);
v61 = v52 + (float)(v58.n128_f32[0] - v57);
v62 = v61 <= v60;
if ( v61 <= v60 )
v61 = v60;
v133 = v62;
v134 = v61 >= v49;
if ( v61 < v49 )
*(float *)&v48 = v61;
else
*(float *)&v48 = v49;
if ( !a1->m_isUpsideDown )
goto LABEL_69;
}
else
{
v65 = (float)(v49 + v59) - v52;
v66 = (float)(v57 + v58.n128_f32[0]) - v52;
v67 = v66 >= v65;
if ( v66 >= v65 )
v66 = v65;
v133 = v67;
v134 = v66 <= *(float *)&v48;
if ( v66 > *(float *)&v48 )
*(float *)&v48 = v66;
if ( a1->m_isUpsideDown )
{
LABEL_69:
v63 = 0.0;
if ( (v22 & 1) == 0 )
{
if ( !a1->m_isShip && !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing )
{
v63 = v29;
if ( (v55 & 1) != 0 )
goto LABEL_78;
goto LABEL_132;
}
v63 = v29;
if ( a1->m_jumpBuffered )
{
v63 = 2.0;
if ( !a1->m_wasOnSlope )
v63 = 1.0;
}
}
if ( (v55 & 1) != 0 )
{
LABEL_78:
m_isOnSlope = 1;
goto LABEL_138;
}
LABEL_132:
if ( a1->m_isShip || a1->m_isBird || a1->m_isDart )
{
if ( (v22 & 1) == 0 )
goto LABEL_137;
}
else if ( (a1->m_isSwing & (unsigned __int8)v22 & 1) == 0 )
{
goto LABEL_137;
}
if ( !a1->m_isPlatformer )
goto LABEL_78;
LABEL_137:
m_isOnSlope = a1->m_isOnSlope;
LABEL_138:
v58.n128_u32[0] = HIDWORD(v137);
v78 = *((float *)&v137 + 1) < *(float *)&v48;
if ( *((float *)&v137 + 1) >= *(float *)&v48 && !m_isOnSlope )
v78 = *((float *)&v137 + 1) < (float)(*(float *)&v48 + v63);
if ( *((float *)&v137 + 1) > *(float *)&v48 || m_isOnSlope )
v79 = *((float *)&v137 + 1) > *(float *)&v48;
else
v79 = *((float *)&v137 + 1) > (float)(*(float *)&v48 - v63);
if ( !v13 )
v79 = v78;
if ( a1->m_jumpBuffered )
{
m_wasOnSlope = 0;
v74 = 0;
if ( !v79 )
{
LABEL_147:
v77 = 0;
v128 = 0;
v76 = 1;
LABEL_180:
if ( a1->m_isSideways )
{
v138[0].i32[0] = a3->m_uniqueID;
v80 = *(float *)&v48;
if ( sub_100018814(&a1->m_rotateObjectsRelated.__table_.__bucket_list_.__ptr_.__value_, (int *)v138) )
{
LODWORD(v136) = a3->m_uniqueID;
v138[0] = (float32x2_t)&v136;
v80 = *(float *)&v48
- *((double *)sub_10001A558(
(unsigned __int64)&a1->m_rotateObjectsRelated,
(int *)&v136,
(__int64)&unk_10063A946,
v138)
+ 4);
}
}
else
{
v80 = *(float *)&v48;
}
v81 = *(float *)&v48;
if ( a1->m_wasOnSlope )
{
if ( (a1->m_unk3d0 == v81 || a1->m_isSideways && a1->m_blackOrbRelated == v80)
&& (!a1->m_isPlatformer || fabs(a1->m_platformerXVelocity) >= 0.100000001) )
{
goto LABEL_188;
}
if ( v54 != 0.0 )
{
if ( v133 && a1->m_unk3e0 )
goto LABEL_198;
if ( !v134 )
{
LOBYTE(v134) = 0;
goto LABEL_207;
}
if ( a1->m_unk3e1 )
{
LABEL_198:
if ( !a1->m_isDashing && (!a1->m_isPlatformer || fabs(a1->m_platformerXVelocity) > 0.100000001) )
{
LABEL_188:
v77 = 0;
goto LABEL_209;
}
}
else
{
LOBYTE(v134) = 1;
}
}
}
LABEL_207:
if ( v77 && a1->m_isPlatformer )
{
sub_100022990(
(float *)v138,
*(float *)&v144 + -2.0,
*((float *)&v144 + 1) + -10.0,
v145 + 4.0,
v146 + 20.0);
v77 = sub_100022CB0((float *)&v141, (float *)v138);
}
LABEL_209:
if ( (v22 & 1) != 0 && a1->m_isDart && a1->m_jumpBuffered )
{
if ( a1->m_isUpsideDown == v13 || !v77 )
return;
}
else if ( !v77 )
{
return;
}
a1->m_currentSlope = a3;
a1->m_slopeAngleRadians = GameObject::getSlopeAngle(a3);
a1->m_currentPotentialSlope = a1->m_currentSlope;
LODWORD(v136) = a3->m_uniqueID;
v138[0] = (float32x2_t)&v136;
sub_100019F24((unsigned __int64)&a1->m_potentialSlopeMap, (int *)&v136, (__int64)&unk_10063A946, v138)[3] = a3;
a1->unk_584 = (float)(v57 + (float)(v146 * -0.5));
a1->m_isCurrentSlopeTop = v13;
a1->m_unk3d0 = v81;
a1->m_blackOrbRelated = v80;
a1->m_collidingWithSlopeId = a3->m_uniqueID;
if ( a1->m_isUpsideDown )
v83 = -1;
else
v83 = 1;
a1->m_slopeFlipGravityRelated = v22 & 1;
v84 = a1->m_slopeRotation;
a1->m_unk3e0 = v133;
a1->m_unk3e1 = v134;
if ( (v22 & 1) == 0 )
v83 = -v83;
if ( v56 < v130 )
v83 = -v83;
if ( v12 )
v83 = -v83;
if ( a1->m_isSideways )
v83 = -v83;
a1->m_slopeRotation = (float)((float)((float)(v131 * 57.296) * (float)v83) * 0.017453);
v85 = (__int64 *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
v86 = sub_1000229B8((__int64 *)v138, v85);
v87.n128_u32[0] = *(_DWORD *)((__int64 (__fastcall *)(PlayerObject *, float))a1->getPosition)(a1, v86);
v88.n128_u32[0] = v48;
sub_100022980(v87, v88, &v136);
((void (__fastcall *)(PlayerObject *, __int64 *))a1->setPosition)(a1, &v136);
a1->m_isOnSlope = 1;
if ( !a1->m_wasOnSlope )
{
a1->m_slopeStartTime = a1->m_totalTime;
a1->m_yVelocityBeforeSlope = a1->m_yVelocity;
}
a1->m_maybeUpsideDownSlope = v76;
if ( (m_wasOnSlope & 1) == 0 )
{
if ( v76 )
{
m_yVelocity = a1->m_yVelocity;
v90 = 0.0;
if ( a1->m_isUpsideDown )
{
if ( m_yVelocity < 0.0 )
{
LABEL_233:
v91 = (double)(int)v90;
if ( v90 != v91 )
v90 = round((v90 - v91) * 1000.0) / 1000.0 + v91;
a1->m_yVelocity = v90;
a1->m_isOnGround = 0;
a1->m_isOnGround2 = 0;
PlayerObject::updateCollide(a1, (PlayerCollisionDirection)0, a3);
goto LABEL_264;
}
}
else if ( m_yVelocity > 0.0 )
{
goto LABEL_233;
}
v90 = a1->m_yVelocity;
goto LABEL_233;
}
v92 = a1->m_yVelocity;
PlayerObject::hitGround(a1, a3, 0);
if ( a1->m_isUpsideDown )
v93 = v92 < -5.0;
else
v93 = v92 > 5.0;
if ( v93 )
{
v94 = v92;
v95 = (double)(int)v92;
if ( v95 != v92 )
v94 = round((v94 - v95) * 1000.0) / 1000.0 + v95;
a1->m_yVelocity = v94;
}
if ( a1->m_isPlatformer && fabsf(a1->m_slopeAngleRadians * 57.296) > 40.0 && v92 < -5.0 )
{
m_platformerXVelocity = a1->m_platformerXVelocity;
if ( m_platformerXVelocity > 0.0 )
a1->m_platformerXVelocity = m_platformerXVelocity * 0.5;
}
PlayerObject::updateCollide(a1, (PlayerCollisionDirection)1, a3);
a1->m_currentSlope2 = a3;
v97 = GameObject::getSlopeAngle(a3);
a1->m_slopeAngle = v97;
v98 = a1->m_currentSlope2->m_slopeUphill;
a1->m_slopeSlidingMaybeRotated = v98;
if ( a1->m_isSideways )
{
v98 ^= 1u;
a1->m_slopeSlidingMaybeRotated = v98;
}
if ( v98 && v97 >= 1.0 )
a1->m_maybeSlidingTime = 3;
v99 = (__int64 *)GameObject::getLastPosition(a3);
v100 = sub_1000229B8(&v136, v99);
((void (__fastcall *)(__int64 *__return_ptr, GameObject *, float))a3->getRealPosition)(
&v135,
a3,
v100);
v101 = *(float *)&v135;
v102 = *(float *)&v136;
if ( *(float *)&v135 == *(float *)&v136 )
{
v103 = *((float *)&v135 + 1);
v104 = *((float *)&v136 + 1);
if ( *((float *)&v135 + 1) == *((float *)&v136 + 1) )
goto LABEL_264;
}
else
{
v104 = *((float *)&v136 + 1);
v103 = *((float *)&v135 + 1);
}
if ( a1->m_isUpsideDown )
{
v105 = *(float *)&v136 > *(float *)&v135;
}
else
{
v102 = v104;
v101 = v103;
v105 = v104 < v103;
}
if ( v105 )
a1->m_groundYVelocity = (float)((float)(v101 - v102) / v127);
}
LABEL_264:
v106 = a1->m_isUpsideDown;
if ( (v74 & 1) == 0 )
goto LABEL_272;
v107 = a1->m_yVelocity;
if ( a1->m_isUpsideDown )
{
v108 = 2.0;
if ( v107 >= 2.0 )
goto LABEL_272;
}
else
{
v108 = -2.0;
if ( v107 <= -2.0 )
goto LABEL_272;
}
v109 = (double)(int)v108;
if ( v108 != v109 )
v108 = round((v108 - v109) * 1000.0) / 1000.0 + v109;
a1->m_yVelocity = v108;
LABEL_272:
if ( v128 )
{
v110 = a1->m_yVelocity;
if ( v106 )
{
v111 = -2.0;
if ( v110 <= -2.0 )
{
v106 = 1;
goto LABEL_281;
}
}
else
{
v111 = 2.0;
if ( v110 >= 2.0 )
{
v106 = 0;
goto LABEL_281;
}
}
v112 = (double)(int)v111;
if ( v111 != v112 )
v111 = round((v111 - v112) * 1000.0) / 1000.0 + v112;
a1->m_yVelocity = v111;
}
LABEL_281:
a1->m_currentSlopeYVelocity = v132;
v113 = (float)(v132 * 1.4) * fminf(0.8 / v131, 1.1);
v114 = -v113;
if ( v129 & 1 | ((v22 & 1) == 0) )
v114 = v113;
if ( v106 )
v114 = -v114;
a1->m_slopeVelocity = v114;
if ( v76 && a1->m_isPlatformer && a1->m_isBird )
a1->m_jumpBuffered = 0;
if ( (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing || a1->m_isBall)
&& (a1->m_slopeVelocity = v114 * 0.75, a1->m_isBall) )
{
v115 = v84;
v116 = v115;
v117 = a1->m_slopeRotation;
if ( v117 != v116 )
{
v118 = v117;
v119 = 1.0 / cosf(v118);
*(_WORD *)&a1->m_isRotating = 0;
if ( v119 > 2.0 )
v119 = (float)((float)(v119 + -1.0) * 0.7) + 1.0;
a1->m_isBallRotating = 0;
a1->m_rotationSpeed = 0.0;
PlayerObject::runBallRotation(a1, v119);
}
}
else
{
PlayerObject::updateSlopeRotation(a1, v127);
}
return;
}
LABEL_161:
if ( a1->m_isShip
|| a1->m_isBird
|| a1->m_isDart
|| a1->m_isSwing
|| a1->m_isBall
|| a1->m_isPlatformer
|| a1->m_stateHitHead > 0 )
{
LABEL_168:
v128 = 0;
v76 = 1;
goto LABEL_169;
}
m_gameModeChangedTime = a1->m_gameModeChangedTime;
if ( m_gameModeChangedTime != 0.0 && a1->m_totalTime - m_gameModeChangedTime < 0.100000001
|| (m_lastFlipTime = a1->m_lastFlipTime, m_lastFlipTime != 0.0)
&& a1->m_totalTime - m_lastFlipTime < 0.100000001 )
{
v122.n128_u32[0] = *(_DWORD *)((__int64 (__fastcall *)(PlayerObject *, __n128))a1->getPosition)(
a1,
v58);
v123.n128_u32[0] = v48;
sub_100022980(v122, v123, v138);
((void (__fastcall *)(PlayerObject *, float32x2_t *))a1->setPosition)(a1, v138);
v124 = a1->m_yVelocity;
if ( a1->m_isUpsideDown )
{
v125 = 2.0;
if ( v124 < 2.0 )
{
LABEL_309:
v126 = (double)(int)v125;
if ( v125 != v126 )
v125 = round((v125 - v126) * 1000.0) / 1000.0 + v126;
a1->m_yVelocity = v125;
goto LABEL_312;
}
}
else
{
v125 = -2.0;
if ( v124 > -2.0 )
goto LABEL_309;
}
v125 = a1->m_yVelocity;
goto LABEL_309;
}
if ( (v13 & 1) != 0 )
{
if ( (float)(*((float *)&v137 + 1) + -2.0) > *(float *)&v48 )
{
LABEL_319:
if ( !a1->m_ignoreDamage )
goto LABEL_171;
goto LABEL_168;
}
}
else if ( (float)(*((float *)&v137 + 1) + 2.0) < *(float *)&v48 )
{
goto LABEL_319;
}
LABEL_312:
a1->m_isOnGround = 0;
a1->m_isOnGround2 = 0;
return;
}
if ( !a1->m_isPlatformer )
{
if ( !a1->m_isShip && !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing )
{
if ( (a1->m_isBall & (unsigned __int8)v22 & 1) == 0 )
{
m_wasOnSlope = 0;
goto LABEL_157;
}
goto LABEL_154;
}
if ( (v22 & 1) != 0 )
{
LABEL_154:
m_wasOnSlope = a1->m_wasOnSlope;
goto LABEL_156;
}
}
m_wasOnSlope = 0;
LABEL_156:
v74 = v22;
if ( a1->m_isShip )
{
LABEL_160:
if ( !v79 )
goto LABEL_147;
goto LABEL_161;
}
LABEL_157:
if ( !a1->m_isBird && !a1->m_isDart )
{
v74 = a1->m_isSwing & v22;
if ( !v79 )
goto LABEL_147;
goto LABEL_161;
}
v74 = v22;
goto LABEL_160;
}
}
if ( ((v55 | v22 ^ 1) & 1) != 0 || a1->m_isOnSlope )
goto LABEL_86;
if ( a1->m_maybeIsBoosted )
{
if ( !a1->m_isShip )
{
if ( !a1->m_isBird && !a1->m_isDart && !a1->m_isSwing )
{
LABEL_86:
v68 = 0;
goto LABEL_87;
}
goto LABEL_129;
}
}
else if ( !a1->m_isShip )
{
LABEL_129:
v68 = 1;
LABEL_87:
v69 = (v34 || v68) | a4 & (v22 ^ 1);
if ( (v22 & 1) != 0 )
v69 = v68;
v70 = v69 ^ 1;
if ( (v13 & 1) != 0 )
{
v71 = *((float *)&v137 + 1) > *(float *)&v48;
if ( v71 | v70 & 1 )
goto LABEL_111;
if ( *((float *)&v137 + 1) > (float)(*(float *)&v48 - v29) )
{
if ( a1->m_isBird )
{
v71 = a1->m_yVelocity >= 0.0;
goto LABEL_111;
}
LABEL_110:
v71 = 1;
LABEL_111:
if ( !a1->m_jumpBuffered )
{
v128 = 0;
v74 = 0;
m_wasOnSlope = 0;
v76 = 0;
v77 = 0;
if ( !v71 )
goto LABEL_180;
LABEL_169:
if ( !a3->m_slopeIsHazard
&& ((v55 & 1) == 0 && (!a1->m_isDart || a1->m_stateDartSlide > 0)
|| a1->m_isPlatformer
|| a1->m_stateHitHead > 0)
|| a1->m_ignoreDamage )
{
v77 = 1;
goto LABEL_180;
}
LABEL_171:
if ( a1->m_maybeCanRunIntoBlocks )
{
a1->m_maybeIsColliding = 1;
}
else
{
v82 = GameManager::sharedState();
((void (__fastcall *)(PlayLayer *, PlayerObject *, _QWORD))v82->m_playLayer->destroyPlayer)(
v82->m_playLayer,
a1,
0);
}
return;
}
v72 = a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing;
if ( (v72 & v22 & 1) != 0 )
{
if ( a1->m_isPlatformer )
{
m_isPlatformer = 1;
goto LABEL_123;
}
}
else if ( v72 )
{
m_isPlatformer = a1->m_isPlatformer;
LABEL_123:
v74 = 0;
v76 = 0;
v77 = 0;
m_wasOnSlope = v55 & m_isPlatformer ^ 1;
v128 = 1;
if ( !v71 )
goto LABEL_180;
goto LABEL_169;
}
v128 = 0;
v74 = 0;
m_wasOnSlope = 0;
v76 = 0;
v77 = 0;
if ( !v71 )
goto LABEL_180;
goto LABEL_169;
}
}
else
{
v71 = *((float *)&v137 + 1) < *(float *)&v48;
if ( v71 | v70 & 1 )
goto LABEL_111;
if ( *((float *)&v137 + 1) < (float)(v29 + *(float *)&v48) )
{
if ( a1->m_isBird )
{
v71 = a1->m_yVelocity <= 0.0;
goto LABEL_111;
}
goto LABEL_110;
}
}
v71 = 0;
goto LABEL_111;
}
v68 = !a1->m_jumpBuffered;
goto LABEL_87;
}
v55 = 0;
}
else
{
v55 = 0;
v54 = v46;
}
v56 = v45;
goto LABEL_62;
}
}
}