//
// PlayerObject::propellPlayer from 0x629690 to 0x629908 (632 bytes)
//
// 3 xrefs:
// > PlayerObject::bumpPlayer @ 0x637398
// > GJBaseGameLayer::gravBumpPlayer @ 0x88b5e4
// > ??> @ 0x56100
//
// 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::propellPlayer(PlayerObject *a1, float a2, bool a3, int a4)
{
float m_vehicleSize; // s2
_BOOL4 v6; // w21
__int64 v8; // x1
float v9; // s8
int v10; // w0
float v11; // s0
float v12; // s1
GJSpiderSprite *m_spiderSprite; // x22
__int64 v14; // x2
void *v15; // x0
unsigned int *v16; // x2
int v17; // w1
GJRobotSprite *m_robotSprite; // x22
unsigned int *v19; // x2
_QWORD v21[2]; // [xsp+60h] [xbp+60h] BYREF
m_vehicleSize = a1->m_vehicleSize;
v6 = a3;
v8 = _stack_chk_guard;
a1->m_maybeIsBoosted = 1;
a1->m_isOnGround2 = 0;
v21[1] = v8;
a1->m_isOnGround = 0;
a1->m_shouldTryPlacingCheckpoint = 1;
a1->m_isOnSlope = 0;
a1->m_wasOnSlope = 0;
v9 = 1.0;
if ( m_vehicleSize != 1.0 )
v9 = 0.8;
v10 = PlayerObject::flipMod(a1);
PlayerObject::setYVelocity(a1, (float)((float)((float)(a2 * 16.0) * (float)v10) * v9), 44);
if ( a1->m_isBall || a1->m_isSpider || a1->m_isSwing )
{
a1->m_yVelocity = a1->m_yVelocity * 0.600000024;
PlayerObject::runRotateAction(a1, 0, 7);
if ( !v6 )
goto LABEL_16;
LABEL_6:
if ( a1->m_isRobot )
goto LABEL_17;
LABEL_7:
if ( !a1->m_isSpider )
goto LABEL_8;
m_spiderSprite = a1->m_spiderSprite;
sub_D153B8((int)v21, "fall_loop");
CCAnimatedSprite::runAnimation((__int64)m_spiderSprite, (__int64)v21);
v14 = v21[0];
v15 = (void *)(v21[0] - 24LL);
if ( (__int64 *)(v21[0] - 24LL) == &qword_124B6B0 )
goto LABEL_8;
if ( &pthread_create )
{
v16 = (unsigned int *)(v21[0] - 8LL);
do
v17 = __ldaxr(v16);
while ( __stlxr(v17 - 1, v16) );
goto LABEL_21;
}
LABEL_23:
v17 = *(_DWORD *)(v14 - 8);
*(_DWORD *)(v14 - 8) = v17 - 1;
goto LABEL_21;
}
PlayerObject::runRotateAction(a1, 0, 7);
if ( v6 )
goto LABEL_6;
LABEL_16:
PlayerObject::playBumpEffect(a1, a4, nullptr);
if ( !a1->m_isRobot )
goto LABEL_7;
LABEL_17:
m_robotSprite = a1->m_robotSprite;
sub_D153B8((int)v21, "jump_start");
CCAnimatedSprite::runAnimation((__int64)m_robotSprite, (__int64)v21);
v14 = v21[0];
v15 = (void *)(v21[0] - 24LL);
if ( (__int64 *)(v21[0] - 24LL) == &qword_124B6B0 )
goto LABEL_8;
if ( !&pthread_create )
goto LABEL_23;
v19 = (unsigned int *)(v21[0] - 8LL);
do
v17 = __ldaxr(v19);
while ( __stlxr(v17 - 1, v19) );
LABEL_21:
if ( v17 <= 0 )
operator delete(v15);
LABEL_8:
PlayerObject::activateStreak(a1);
v11 = ((float (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
cocos2d::CCPoint::operator=(&a1->m_lastGroundedPos, v11, v12);
}