//
// PlayerObject::propellPlayer from 0x10022cd04 to 0x10022cea0 (412 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::gravBumpPlayer @ 0x1001e91cc
// > PlayerObject::bumpPlayer @ 0x10022cb6c
//
// 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::propellPlayer(PlayerObject *a1, float a2, bool a3, int a4)
{
float v7; // s1
float v8; // s3
float v9; // s0
float v10; // s1
double v11; // d0
double v12; // d1
GameObject *v13; // x2
GJRobotSprite *m_robotSprite; // x20
void **v15; // x8
GJSpiderSprite *m_spiderSprite; // x20
double *v17; // x0
_QWORD v18[2]; // [xsp+0h] [xbp-50h] BYREF
char v19; // [xsp+17h] [xbp-39h]
_QWORD v20[2]; // [xsp+18h] [xbp-38h] BYREF
char v21; // [xsp+2Fh] [xbp-21h]
a1->m_maybeIsBoosted = 1;
a1->m_isOnGround2 = 0;
a1->m_isOnGround = 0;
a1->m_shouldTryPlacingCheckpoint = 1;
*(_WORD *)&a1->m_isOnSlope = 0;
v7 = 0.8;
if ( a1->m_vehicleSize == 1.0 )
v7 = 1.0;
v8 = a2 * 16.0;
v9 = -(float)(a2 * 16.0);
if ( !a1->m_isUpsideDown )
v9 = v8;
v10 = v7 * v9;
v11 = v10;
v12 = (double)(int)v10;
if ( v12 != v11 )
v11 = round((v11 - v12) * 1000.0) / 1000.0 + v12;
a1->m_yVelocity = v11;
if ( a1->m_isBall || a1->m_isSpider || a1->m_isSwing )
a1->m_yVelocity = v11 * 0.600000024;
PlayerObject::runRotateAction(a1, 0, a4);
if ( !a3 )
PlayerObject::playBumpEffect(a1, a4, v13);
if ( a1->m_isRobot )
{
m_robotSprite = a1->m_robotSprite;
sub_100009900(v20, "jump_start");
CCAnimatedSprite::runAnimation(m_robotSprite, v20);
if ( v21 < 0 )
{
v15 = (void **)v20;
LABEL_19:
operator delete(*v15);
}
}
else if ( a1->m_isSpider )
{
m_spiderSprite = a1->m_spiderSprite;
sub_100009900(v18, "fall_loop");
CCAnimatedSprite::runAnimation(m_spiderSprite, v18);
if ( v19 < 0 )
{
v15 = (void **)v18;
goto LABEL_19;
}
}
PlayerObject::activateStreak(a1);
v17 = (double *)((__int64 (__fastcall *)(PlayerObject *))a1->getPosition)(a1);
sub_1000229D0(&a1->m_lastGroundedPos, v17);
}