//
// PlayerObject::updateCheckpointTest from 0x10021d7bc to 0x10021d89c (224 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::update @ 0x1001fee58
//
// 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::updateCheckpointTest(PlayerObject *a1)
{
int m_onFlyCheckpointTries; // w8
timeb v3; // [xsp+0h] [xbp-20h] BYREF
if ( a1->m_canPlaceCheckpoint )
{
PlayerObject::tryPlaceCheckpoint(a1);
a1->m_canPlaceCheckpoint = 0;
}
if ( (a1->m_isShip || a1->m_isBird || a1->m_isDart || a1->m_isSwing) && a1->m_uniqueID == 1 )
{
m_onFlyCheckpointTries = a1->m_onFlyCheckpointTries;
a1->m_onFlyCheckpointTries = m_onFlyCheckpointTries + 1;
if ( m_onFlyCheckpointTries >= 19 )
{
a1->m_onFlyCheckpointTries = 0;
PlayerObject::tryPlaceCheckpoint(a1);
}
}
if ( a1->m_checkpointTimeout )
{
ftime(&v3);
if ( (double)(v3.millitm + 1000 * (unsigned __int64)(v3.time & 0xFFFFF)) / 1000.0 - a1->m_lastCheckpointTime > 0.100000001 )
a1->m_checkpointTimeout = 0;
}
}