#include "includes.hpp"

extern bool input_buffer;

struct checkpoint_data {
	// cocos2d::CCNode* m_mainLayer;
	bool m_wasTeleported;
	bool m_fixGravityBug;
	bool m_reverseSync;
	double m_yVelocityBeforeSlope;
	double m_dashX;
	double m_dashY;
	double m_dashAngle;
	double m_dashStartTime;
	// DashRingObject* m_dashRing;
	double m_slopeStartTime;
	bool m_justPlacedStreak;
	// GameObject* m_maybeLastGroundObject;
	// cocos2d::CCDictionary* m_collisionLogTop;
	// cocos2d::CCDictionary* m_collisionLogBottom;
	// cocos2d::CCDictionary* m_collisionLogLeft;
	// cocos2d::CCDictionary* m_collisionLogRight;
	int m_lastCollisionBottom;
	int m_lastCollisionTop;
	int m_lastCollisionLeft;
	int m_lastCollisionRight;
	int m_unk50C;
	int m_unk510;
	// GameObject* m_currentSlope2;
	// GameObject* m_preLastGroundObject;
	float m_slopeAngle;
	bool m_slopeSlidingMaybeRotated;
	bool m_quickCheckpointMode;
	// GameObject* m_collidedObject;
	// GameObject* m_lastGroundObject;
	// GameObject* m_collidingWithLeft;
	// GameObject* m_collidingWithRight;
	int m_maybeSavedPlayerFrame;
	double m_scaleXRelated2;
	double m_groundYVelocity;
	double m_yVelocityRelated;
	double m_scaleXRelated3;
	double m_scaleXRelated4;
	double m_scaleXRelated5;
	bool m_isCollidingWithSlope;
    // cocos2d::CCSprite* m_dashFireSprite;
	bool m_isBallRotating;
	bool m_unk669;
	// GameObject* m_currentSlope3;
	// GameObject* m_currentSlope;
	double unk_584;
	int m_collidingWithSlopeId;
	bool m_slopeFlipGravityRelated;
	// cocos2d::CCArray* m_particleSystems;
	float m_slopeAngleRadians;
	// gd::unordered_map<int, GJPointDouble> m_rotateObjectsRelated;
	// gd::unordered_map<int, GameObject*> m_maybeRotatedObjectsMap;
	float m_rotationSpeed;
	float m_rotateSpeed;
	bool m_isRotating;
	bool m_isBallRotating2;
	bool m_hasGlow;
	bool m_isHidden;
	// GhostType m_ghostType;
	// GhostTrailEffect* m_ghostTrail;
	// cocos2d::CCSprite* m_iconSprite;
	// cocos2d::CCSprite* m_iconSpriteSecondary;
	// cocos2d::CCSprite* m_iconSpriteWhitener;
	// cocos2d::CCSprite* m_iconGlow;
	// cocos2d::CCSprite* m_vehicleSprite;
	// cocos2d::CCSprite* m_vehicleSpriteSecondary;
	// cocos2d::CCSprite* m_birdVehicle;
	// cocos2d::CCSprite* m_vehicleSpriteWhitener;
	// cocos2d::CCSprite* m_vehicleGlow;
	// PlayerFireBoostSprite* m_swingFireMiddle;
	// PlayerFireBoostSprite* m_swingFireBottom;
	// PlayerFireBoostSprite* m_swingFireTop;
	// cocos2d::CCSprite* m_dashSpritesContainer;
	// cocos2d::CCMotionStreak* m_regularTrail;
	// cocos2d::CCMotionStreak* m_shipStreak;
	// HardStreak* m_waveTrail;
	double m_speedMultiplier;
	double m_yStart;
	double m_gravity;
	float m_trailingParticleLife;
	float m_unk648;
	double m_gameModeChangedTime;
	bool m_padRingRelated;
	bool m_maybeReducedEffects;
	bool m_maybeIsFalling;
	bool m_shouldTryPlacingCheckpoint;
	bool m_playEffects;
	bool m_maybeCanRunIntoBlocks;
	bool m_hasGroundParticles;
	bool m_hasShipParticles;
	bool m_isOnGround3;
	bool m_checkpointTimeout;
	double m_lastCheckpointTime;
	double m_lastJumpTime;
	double m_lastFlipTime;
	double m_flashTime;
	float m_flashRelated;
	float m_flashRelated1;
	// cocos2d::ccColor3B m_colorRelated2;
	// cocos2d::ccColor3B m_flashRelated3;
	double m_lastSpiderFlipTime;
	bool m_unkBool5;
	bool m_maybeIsVehicleGlowing;
	bool m_gv0096;
	bool m_gv0100;
	double m_accelerationOrSpeed;
	double m_snapDistance;
	bool m_ringJumpRelated;
	// gd::unordered_set<int> m_ringRelatedSet;
	// GameObject* m_objectSnappedTo;
	// CheckpointObject* m_pendingCheckpoint;
	int m_onFlyCheckpointTries;
	// GJRobotSprite* m_robotSprite;
	// GJSpiderSprite* m_spiderSprite;
	bool m_maybeSpriteRelated;
	// cocos2d::CCParticleSystemQuad* m_playerGroundParticles;
	// cocos2d::CCParticleSystemQuad* m_trailingParticles;
	// cocos2d::CCParticleSystemQuad* m_shipClickParticles;
	// cocos2d::CCParticleSystemQuad* m_vehicleGroundParticles;
	// cocos2d::CCParticleSystemQuad* m_ufoClickParticles;
	// cocos2d::CCParticleSystemQuad* m_robotBurstParticles;
	// cocos2d::CCParticleSystemQuad* m_dashParticles;
	// cocos2d::CCParticleSystemQuad* m_swingBurstParticles1;
	// cocos2d::CCParticleSystemQuad* m_swingBurstParticles2;
	bool m_useLandParticles0;
	// cocos2d::CCParticleSystemQuad* m_landParticles0;
	// cocos2d::CCParticleSystemQuad* m_landParticles1;
	float m_landParticlesAngle;
	float m_landParticleRelatedY;
	int m_playerStreak;
	float m_streakRelated1;
	bool m_streakRelated2;
	bool m_streakRelated3;
	// ShipStreak m_shipStreakType;
	double m_slopeRotation;
	double m_currentSlopeYVelocity;
	double m_unk3d0;
	double m_blackOrbRelated;
	bool m_unk3e0;
	bool m_unk3e1;
	bool m_isAccelerating;
	bool m_isCurrentSlopeTop;
	double m_collidedTopMinY;
	double m_collidedBottomMaxY;
	double m_collidedLeftMaxX;
	double m_collidedRightMinX;
	bool m_streakRelated4;
	bool m_canPlaceCheckpoint;
	// cocos2d::ccColor3B m_colorRelated;
	// cocos2d::ccColor3B m_secondColorRelated;
	bool m_hasCustomGlowColor;
	// cocos2d::ccColor3B m_glowColor;
	bool m_maybeIsColliding;
	bool m_jumpBuffered;
	bool m_stateRingJump;
	bool m_wasJumpBuffered;
	bool m_wasRobotJump;
	unsigned char m_stateJumpBuffered;
	bool m_stateRingJump2;
	bool m_touchedRing;
	bool m_touchedCustomRing;
	bool m_touchedGravityPortal;
	bool m_maybeTouchedBreakableBlock;
	geode::SeedValueRSV m_jumpRelatedAC2;
	bool m_touchedPad;
	double m_yVelocity;
	double m_fallSpeed;
	bool m_isOnSlope;
	bool m_wasOnSlope;
	float m_slopeVelocity;
	bool m_maybeUpsideDownSlope;
	bool m_isShip;
	bool m_isBird;
	bool m_isBall;
	bool m_isDart;
	bool m_isRobot;
	bool m_isSpider;
	bool m_isUpsideDown;
	bool m_isDead;
	bool m_isOnGround;
	bool m_isGoingLeft;
	bool m_isSideways;
	bool m_isSwing;
	int m_reverseRelated;
	double m_maybeReverseSpeed;
	double m_maybeReverseAcceleration;
	float m_xVelocityRelated2;
	bool m_isDashing;
	int m_unk9e8;
	int m_groundObjectMaterial;
	float m_vehicleSize;
	float m_playerSpeed;
	cocos2d::CCPoint m_shipRotation;
	cocos2d::CCPoint m_lastPortalPos;
	float m_unkUnused3;
	bool m_isOnGround2;
	double m_lastLandTime;
	float m_platformerVelocityRelated;
	bool m_maybeIsBoosted;
	double m_scaleXRelatedTime;
	bool m_decreaseBoostSlide;
	bool m_unkA29;
	bool m_isLocked;
	bool m_controlsDisabled;
	cocos2d::CCPoint m_lastGroundedPos;
	// cocos2d::CCArray* m_touchingRings;
	// gd::unordered_set<int> m_touchedRings;
	// GameObject* m_lastActivatedPortal;
	bool m_hasEverJumped;
	bool m_ringOrStreakRelated;
	// cocos2d::ccColor3B m_playerColor1;
	// cocos2d::ccColor3B m_playerColor2;
	cocos2d::CCPoint m_position;
	bool m_isSecondPlayer;
	bool m_unkA99;
	double m_totalTime;
	bool m_isBeingSpawnedByDualPortal;
	float m_unkAAC;
	float m_unkAngle1;
	float m_yVelocityRelated3;
	bool m_gamevar0060;
	bool m_swapColors;
	bool m_gamevar0062;
	int m_followRelated;
	// gd::vector<float> m_playerFollowFloats;
	float m_unk838;
	int m_stateOnGround;
	unsigned char m_stateUnk;
	unsigned char m_stateNoStickX;
	unsigned char m_stateNoStickY;
	unsigned char m_stateUnk2;
	int m_stateBoostX;
	int m_stateBoostY;
	int m_maybeStateForce2;
	int m_stateScale;
	double m_platformerXVelocity;
	bool m_holdingRight;
	bool m_holdingLeft;
	bool m_leftPressedFirst;
	double m_scaleXRelated;
	bool m_maybeHasStopped;
	float m_xVelocityRelated;
	bool m_maybeGoingCorrectSlopeDirection;
	bool m_isSliding;
	double m_maybeSlopeForce;
	bool m_isOnIce;
	double m_physDeltaRelated;
	bool m_isOnGround4;
	int m_maybeSlidingTime;
	double m_maybeSlidingStartTime;
	double m_changedDirectionsTime;
	double m_slopeEndTime;
	bool m_isMoving;
	bool m_platformerMovingLeft;
	bool m_platformerMovingRight;
	bool m_isSlidingRight;
	double m_maybeChangedDirectionAngle;
	double m_unkUnused2;
	bool m_isPlatformer;
	int m_stateNoAutoJump;
	int m_stateDartSlide;
	int m_stateHitHead;
	int m_stateFlipGravity;
	float m_gravityMod;
	int m_stateForce;
	cocos2d::CCPoint m_stateForceVector;
	bool m_affectedByForces;
	// gd::map<int, bool> m_jumpPadRelated;
	float m_somethingPlayerSpeedTime;
	float m_playerSpeedAC;
	bool m_fixRobotJump;
	// gd::map<int, bool> m_holdingButtons;
	bool m_inputsLocked;
	// gd::string m_currentRobotAnimation;
	bool m_gv0123;
	int m_iconRequestID;
	// cocos2d::CCSpriteBatchNode* m_robotBatchNode;
	// cocos2d::CCSpriteBatchNode* m_spiderBatchNode;
	cocos2d::CCArray* m_unk958;
	// PlayerFireBoostSprite* m_robotFire;
	int m_unkUnused;
	// GJBaseGameLayer* m_gameLayer;
	// cocos2d::CCLayer* m_parentLayer;
	// GJActionManager* m_actionManager;
	bool m_isOutOfBounds;
	float m_fallStartY;
	bool m_disablePlayerSqueeze;
	bool m_robotHasRun3;
	bool m_robotHasRun2;
	bool m_item20;
	// bool m_ignoreDamage;
	bool m_enable22Changes;
};

static checkpoint_data create_checkpoint_p1(PlayLayer* self) {
    checkpoint_data result;
    
    // result.m_mainLayer = self->m_player1->m_mainLayer;
    result.m_wasTeleported = self->m_player1->m_wasTeleported;
    result.m_fixGravityBug = self->m_player1->m_fixGravityBug;
    result.m_reverseSync = self->m_player1->m_reverseSync;
    result.m_yVelocityBeforeSlope = self->m_player1->m_yVelocityBeforeSlope;
    // result.m_dashX = self->m_player1->m_dashX;
    // result.m_dashY = self->m_player1->m_dashY;
    // result.m_dashAngle = self->m_player1->m_dashAngle;
    // result.m_dashStartTime = self->m_player1->m_dashStartTime;
    // result.m_dashRing = self->m_player1->m_dashRing;
    result.m_slopeStartTime = self->m_player1->m_slopeStartTime;
    result.m_justPlacedStreak = self->m_player1->m_justPlacedStreak;
    // result.m_maybeLastGroundObject = self->m_player1->m_maybeLastGroundObject;
    // result.m_collisionLogTop = self->m_player1->m_collisionLogTop;
    // result.m_collisionLogBottom = self->m_player1->m_collisionLogBottom;
    // result.m_collisionLogLeft = self->m_player1->m_collisionLogLeft;
    // result.m_collisionLogRight = self->m_player1->m_collisionLogRight;
    result.m_lastCollisionBottom = self->m_player1->m_lastCollisionBottom;
    result.m_lastCollisionTop = self->m_player1->m_lastCollisionTop;
    result.m_lastCollisionLeft = self->m_player1->m_lastCollisionLeft;
    result.m_lastCollisionRight = self->m_player1->m_lastCollisionRight;
    result.m_unk50C = self->m_player1->m_unk50C;
    result.m_unk510 = self->m_player1->m_unk510;
    // result.m_currentSlope2 = self->m_player1->m_currentSlope2;
    // result.m_preLastGroundObject = self->m_player1->m_preLastGroundObject;
    result.m_slopeAngle = self->m_player1->m_slopeAngle;
    result.m_slopeSlidingMaybeRotated = self->m_player1->m_slopeSlidingMaybeRotated;
    result.m_quickCheckpointMode = self->m_player1->m_quickCheckpointMode;
    // result.m_collidedObject = self->m_player1->m_collidedObject;
    // result.m_lastGroundObject = self->m_player1->m_lastGroundObject;
    // result.m_collidingWithLeft = self->m_player1->m_collidingWithLeft;
    // result.m_collidingWithRight = self->m_player1->m_collidingWithRight;
    result.m_maybeSavedPlayerFrame = self->m_player1->m_maybeSavedPlayerFrame;
    result.m_scaleXRelated2 = self->m_player1->m_scaleXRelated2;
    result.m_groundYVelocity = self->m_player1->m_groundYVelocity;
    result.m_yVelocityRelated = self->m_player1->m_yVelocityRelated;
    result.m_scaleXRelated3 = self->m_player1->m_scaleXRelated3;
    result.m_scaleXRelated4 = self->m_player1->m_scaleXRelated4;
    result.m_scaleXRelated5 = self->m_player1->m_scaleXRelated5;
    result.m_isCollidingWithSlope = self->m_player1->m_isCollidingWithSlope;
    // result.m_dashFireSprite = self->m_player1->m_dashFireSprite;
    result.m_isBallRotating = self->m_player1->m_isBallRotating;
    result.m_unk669 = self->m_player1->m_unk669;
    // result.m_currentSlope3 = self->m_player1->m_currentSlope3;
    // result.m_currentSlope = self->m_player1->m_currentSlope;
    result.unk_584 = self->m_player1->unk_584;
    result.m_collidingWithSlopeId = self->m_player1->m_collidingWithSlopeId;
    result.m_slopeFlipGravityRelated = self->m_player1->m_slopeFlipGravityRelated;
    // result.m_particleSystems = self->m_player1->m_particleSystems;
    result.m_slopeAngleRadians = self->m_player1->m_slopeAngleRadians;
    // result.m_rotateObjectsRelated = self->m_player1->m_rotateObjectsRelated;
    // result.m_maybeRotatedObjectsMap = self->m_player1->m_maybeRotatedObjectsMap;
    result.m_rotationSpeed = self->m_player1->m_rotationSpeed;
    result.m_rotateSpeed = self->m_player1->m_rotateSpeed;
    result.m_isRotating = self->m_player1->m_isRotating;
    result.m_isBallRotating2 = self->m_player1->m_isBallRotating2;
    result.m_hasGlow = self->m_player1->m_hasGlow;
    result.m_isHidden = self->m_player1->m_isHidden;
    // result.m_ghostType = self->m_player1->m_ghostType;
    // result.m_ghostTrail = self->m_player1->m_ghostTrail;
    // result.m_iconSprite = self->m_player1->m_iconSprite;
    // result.m_iconSpriteSecondary = self->m_player1->m_iconSpriteSecondary;
    // result.m_iconSpriteWhitener = self->m_player1->m_iconSpriteWhitener;
    // result.m_iconGlow = self->m_player1->m_iconGlow;
    // result.m_vehicleSprite = self->m_player1->m_vehicleSprite;
    // result.m_vehicleSpriteSecondary = self->m_player1->m_vehicleSpriteSecondary;
    // result.m_birdVehicle = self->m_player1->m_birdVehicle;
    // result.m_vehicleSpriteWhitener = self->m_player1->m_vehicleSpriteWhitener;
    // result.m_vehicleGlow = self->m_player1->m_vehicleGlow;
    // result.m_swingFireMiddle = self->m_player1->m_swingFireMiddle;
    // result.m_swingFireBottom = self->m_player1->m_swingFireBottom;
    // result.m_swingFireTop = self->m_player1->m_swingFireTop;
    // result.m_dashSpritesContainer = self->m_player1->m_dashSpritesContainer;
    // result.m_regularTrail = self->m_player1->m_regularTrail;
    // result.m_shipStreak = self->m_player1->m_shipStreak;
    // result.m_waveTrail = self->m_player1->m_waveTrail;
    result.m_speedMultiplier = self->m_player1->m_speedMultiplier;
    result.m_yStart = self->m_player1->m_yStart;
    result.m_gravity = self->m_player1->m_gravity;
    result.m_trailingParticleLife = self->m_player1->m_trailingParticleLife;
    result.m_unk648 = self->m_player1->m_unk648;
    result.m_gameModeChangedTime = self->m_player1->m_gameModeChangedTime;
    result.m_padRingRelated = self->m_player1->m_padRingRelated;
    result.m_maybeReducedEffects = self->m_player1->m_maybeReducedEffects;
    result.m_maybeIsFalling = self->m_player1->m_maybeIsFalling;
    result.m_shouldTryPlacingCheckpoint = self->m_player1->m_shouldTryPlacingCheckpoint;
    result.m_playEffects = self->m_player1->m_playEffects;
    result.m_maybeCanRunIntoBlocks = self->m_player1->m_maybeCanRunIntoBlocks;
    result.m_hasGroundParticles = self->m_player1->m_hasGroundParticles;
    result.m_hasShipParticles = self->m_player1->m_hasShipParticles;
    result.m_isOnGround3 = self->m_player1->m_isOnGround3;
    result.m_checkpointTimeout = self->m_player1->m_checkpointTimeout;
    result.m_lastCheckpointTime = self->m_player1->m_lastCheckpointTime;
    result.m_lastJumpTime = self->m_player1->m_lastJumpTime;
    result.m_lastFlipTime = self->m_player1->m_lastFlipTime;
    result.m_flashTime = self->m_player1->m_flashTime;
    result.m_flashRelated = self->m_player1->m_flashRelated;
    result.m_flashRelated1 = self->m_player1->m_flashRelated1;
    // result.m_colorRelated2 = self->m_player1->m_colorRelated2;
    // result.m_flashRelated3 = self->m_player1->m_flashRelated3;
    result.m_lastSpiderFlipTime = self->m_player1->m_lastSpiderFlipTime;
    result.m_unkBool5 = self->m_player1->m_unkBool5;
    result.m_maybeIsVehicleGlowing = self->m_player1->m_maybeIsVehicleGlowing;
    result.m_gv0096 = self->m_player1->m_gv0096;
    result.m_gv0100 = self->m_player1->m_gv0100;
    result.m_accelerationOrSpeed = self->m_player1->m_accelerationOrSpeed;
    result.m_snapDistance = self->m_player1->m_snapDistance;
    result.m_ringJumpRelated = self->m_player1->m_ringJumpRelated;
    // result.m_ringRelatedSet = self->m_player1->m_ringRelatedSet;
    // result.m_objectSnappedTo = self->m_player1->m_objectSnappedTo;
    // result.m_pendingCheckpoint = self->m_player1->m_pendingCheckpoint;
    result.m_onFlyCheckpointTries = self->m_player1->m_onFlyCheckpointTries;
    // result.m_robotSprite = self->m_player1->m_robotSprite;
    // result.m_spiderSprite = self->m_player1->m_spiderSprite;
    result.m_maybeSpriteRelated = self->m_player1->m_maybeSpriteRelated;
    // result.m_playerGroundParticles = self->m_player1->m_playerGroundParticles;
    // result.m_trailingParticles = self->m_player1->m_trailingParticles;
    // result.m_shipClickParticles = self->m_player1->m_shipClickParticles;
    // result.m_vehicleGroundParticles = self->m_player1->m_vehicleGroundParticles;
    // result.m_ufoClickParticles = self->m_player1->m_ufoClickParticles;
    // result.m_robotBurstParticles = self->m_player1->m_robotBurstParticles;
    // result.m_dashParticles = self->m_player1->m_dashParticles;
    // result.m_swingBurstParticles1 = self->m_player1->m_swingBurstParticles1;
    // result.m_swingBurstParticles2 = self->m_player1->m_swingBurstParticles2;
    result.m_useLandParticles0 = self->m_player1->m_useLandParticles0;
    // result.m_landParticles0 = self->m_player1->m_landParticles0;
    // result.m_landParticles1 = self->m_player1->m_landParticles1;
    result.m_landParticlesAngle = self->m_player1->m_landParticlesAngle;
    result.m_landParticleRelatedY = self->m_player1->m_landParticleRelatedY;
    result.m_playerStreak = self->m_player1->m_playerStreak;
    result.m_streakRelated1 = self->m_player1->m_streakRelated1;
    result.m_streakRelated2 = self->m_player1->m_streakRelated2;
    result.m_streakRelated3 = self->m_player1->m_streakRelated3;
    // result.m_shipStreakType = self->m_player1->m_shipStreakType;
    result.m_slopeRotation = self->m_player1->m_slopeRotation;
    result.m_currentSlopeYVelocity = self->m_player1->m_currentSlopeYVelocity;
    result.m_unk3d0 = self->m_player1->m_unk3d0;
    result.m_blackOrbRelated = self->m_player1->m_blackOrbRelated;
    result.m_unk3e0 = self->m_player1->m_unk3e0;
    result.m_unk3e1 = self->m_player1->m_unk3e1;
    result.m_isAccelerating = self->m_player1->m_isAccelerating;
    result.m_isCurrentSlopeTop = self->m_player1->m_isCurrentSlopeTop;
    result.m_collidedTopMinY = self->m_player1->m_collidedTopMinY;
    result.m_collidedBottomMaxY = self->m_player1->m_collidedBottomMaxY;
    result.m_collidedLeftMaxX = self->m_player1->m_collidedLeftMaxX;
    result.m_collidedRightMinX = self->m_player1->m_collidedRightMinX;
    result.m_streakRelated4 = self->m_player1->m_streakRelated4;
    result.m_canPlaceCheckpoint = self->m_player1->m_canPlaceCheckpoint;
    // result.m_colorRelated = self->m_player1->m_colorRelated;
    // result.m_secondColorRelated = self->m_player1->m_secondColorRelated;
    result.m_hasCustomGlowColor = self->m_player1->m_hasCustomGlowColor;
    // result.m_glowColor = self->m_player1->m_glowColor;
    result.m_maybeIsColliding = self->m_player1->m_maybeIsColliding;
    result.m_jumpBuffered = self->m_player1->m_jumpBuffered;
    result.m_stateRingJump = self->m_player1->m_stateRingJump;
    result.m_wasJumpBuffered = self->m_player1->m_wasJumpBuffered;
    result.m_wasRobotJump = self->m_player1->m_wasRobotJump;
    result.m_stateJumpBuffered = self->m_player1->m_stateJumpBuffered;
    result.m_stateRingJump2 = self->m_player1->m_stateRingJump2;
    result.m_touchedRing = self->m_player1->m_touchedRing;
    result.m_touchedCustomRing = self->m_player1->m_touchedCustomRing;
    result.m_touchedGravityPortal = self->m_player1->m_touchedGravityPortal;
    result.m_maybeTouchedBreakableBlock = self->m_player1->m_maybeTouchedBreakableBlock;
    result.m_jumpRelatedAC2 = self->m_player1->m_jumpRelatedAC2;
    result.m_touchedPad = self->m_player1->m_touchedPad;
    result.m_yVelocity = self->m_player1->m_yVelocity;
    result.m_fallSpeed = self->m_player1->m_fallSpeed;
    result.m_isOnSlope = self->m_player1->m_isOnSlope;
    result.m_wasOnSlope = self->m_player1->m_wasOnSlope;
    result.m_slopeVelocity = self->m_player1->m_slopeVelocity;
    result.m_maybeUpsideDownSlope = self->m_player1->m_maybeUpsideDownSlope;
    result.m_isShip = self->m_player1->m_isShip;
    result.m_isBird = self->m_player1->m_isBird;
    result.m_isBall = self->m_player1->m_isBall;
    result.m_isDart = self->m_player1->m_isDart;
    result.m_isRobot = self->m_player1->m_isRobot;
    result.m_isSpider = self->m_player1->m_isSpider;
    result.m_isUpsideDown = self->m_player1->m_isUpsideDown;
    result.m_isDead = self->m_player1->m_isDead;
    result.m_isOnGround = self->m_player1->m_isOnGround;
    result.m_isGoingLeft = self->m_player1->m_isGoingLeft;
    result.m_isSideways = self->m_player1->m_isSideways;
    result.m_isSwing = self->m_player1->m_isSwing;
    result.m_reverseRelated = self->m_player1->m_reverseRelated;
    result.m_maybeReverseSpeed = self->m_player1->m_maybeReverseSpeed;
    result.m_maybeReverseAcceleration = self->m_player1->m_maybeReverseAcceleration;
    result.m_xVelocityRelated2 = self->m_player1->m_xVelocityRelated2;
    result.m_isDashing = self->m_player1->m_isDashing;
    result.m_unk9e8 = self->m_player1->m_unk9e8;
    result.m_groundObjectMaterial = self->m_player1->m_groundObjectMaterial;
    result.m_vehicleSize = self->m_player1->m_vehicleSize;
    result.m_playerSpeed = self->m_player1->m_playerSpeed;
    result.m_shipRotation = self->m_player1->m_shipRotation;
    result.m_lastPortalPos = self->m_player1->m_lastPortalPos;
    result.m_unkUnused3 = self->m_player1->m_unkUnused3;
    result.m_isOnGround2 = self->m_player1->m_isOnGround2;
    result.m_lastLandTime = self->m_player1->m_lastLandTime;
    result.m_platformerVelocityRelated = self->m_player1->m_platformerVelocityRelated;
    result.m_maybeIsBoosted = self->m_player1->m_maybeIsBoosted;
    result.m_scaleXRelatedTime = self->m_player1->m_scaleXRelatedTime;
    result.m_decreaseBoostSlide = self->m_player1->m_decreaseBoostSlide;
    result.m_unkA29 = self->m_player1->m_unkA29;
    result.m_isLocked = self->m_player1->m_isLocked;
    result.m_controlsDisabled = self->m_player1->m_controlsDisabled;
    result.m_lastGroundedPos = self->m_player1->m_lastGroundedPos;
    // result.m_touchingRings = self->m_player1->m_touchingRings;
    // result.m_touchedRings = self->m_player1->m_touchedRings;
    // result.m_lastActivatedPortal = self->m_player1->m_lastActivatedPortal;
    result.m_hasEverJumped = self->m_player1->m_hasEverJumped;
    result.m_ringOrStreakRelated = self->m_player1->m_ringOrStreakRelated;
    // result.m_playerColor1 = self->m_player1->m_playerColor1;
    // result.m_playerColor2 = self->m_player1->m_playerColor2;
    result.m_position = self->m_player1->m_position;
    result.m_isSecondPlayer = self->m_player1->m_isSecondPlayer;
    result.m_unkA99 = self->m_player1->m_unkA99;
    result.m_totalTime = self->m_player1->m_totalTime;
    result.m_isBeingSpawnedByDualPortal = self->m_player1->m_isBeingSpawnedByDualPortal;
    result.m_unkAAC = self->m_player1->m_unkAAC;
    result.m_unkAngle1 = self->m_player1->m_unkAngle1;
    result.m_yVelocityRelated3 = self->m_player1->m_yVelocityRelated3;
    result.m_gamevar0060 = self->m_player1->m_gamevar0060;
    result.m_swapColors = self->m_player1->m_swapColors;
    result.m_gamevar0062 = self->m_player1->m_gamevar0062;
    result.m_followRelated = self->m_player1->m_followRelated;
    // result.m_playerFollowFloats = self->m_player1->m_playerFollowFloats;
    result.m_unk838 = self->m_player1->m_unk838;
    result.m_stateOnGround = self->m_player1->m_stateOnGround;
    result.m_stateUnk = self->m_player1->m_stateUnk;
    result.m_stateNoStickX = self->m_player1->m_stateNoStickX;
    result.m_stateNoStickY = self->m_player1->m_stateNoStickY;
    result.m_stateUnk2 = self->m_player1->m_stateUnk2;
    result.m_stateBoostX = self->m_player1->m_stateBoostX;
    result.m_stateBoostY = self->m_player1->m_stateBoostY;
    result.m_maybeStateForce2 = self->m_player1->m_maybeStateForce2;
    result.m_stateScale = self->m_player1->m_stateScale;
    result.m_platformerXVelocity = self->m_player1->m_platformerXVelocity;
    result.m_holdingRight = self->m_player1->m_holdingRight;
    result.m_holdingLeft = self->m_player1->m_holdingLeft;
    result.m_leftPressedFirst = self->m_player1->m_leftPressedFirst;
    result.m_scaleXRelated = self->m_player1->m_scaleXRelated;
    result.m_maybeHasStopped = self->m_player1->m_maybeHasStopped;
    result.m_xVelocityRelated = self->m_player1->m_xVelocityRelated;
    result.m_maybeGoingCorrectSlopeDirection = self->m_player1->m_maybeGoingCorrectSlopeDirection;
    result.m_isSliding = self->m_player1->m_isSliding;
    result.m_maybeSlopeForce = self->m_player1->m_maybeSlopeForce;
    result.m_isOnIce = self->m_player1->m_isOnIce;
    result.m_physDeltaRelated = self->m_player1->m_physDeltaRelated;
    result.m_isOnGround4 = self->m_player1->m_isOnGround4;
    result.m_maybeSlidingTime = self->m_player1->m_maybeSlidingTime;
    result.m_maybeSlidingStartTime = self->m_player1->m_maybeSlidingStartTime;
    result.m_changedDirectionsTime = self->m_player1->m_changedDirectionsTime;
    result.m_slopeEndTime = self->m_player1->m_slopeEndTime;
    result.m_isMoving = self->m_player1->m_isMoving;
    result.m_platformerMovingLeft = self->m_player1->m_platformerMovingLeft;
    result.m_platformerMovingRight = self->m_player1->m_platformerMovingRight;
    result.m_isSlidingRight = self->m_player1->m_isSlidingRight;
    result.m_maybeChangedDirectionAngle = self->m_player1->m_maybeChangedDirectionAngle;
    result.m_unkUnused2 = self->m_player1->m_unkUnused2;
    result.m_isPlatformer = self->m_player1->m_isPlatformer;
    result.m_stateNoAutoJump = self->m_player1->m_stateNoAutoJump;
    result.m_stateDartSlide = self->m_player1->m_stateDartSlide;
    result.m_stateHitHead = self->m_player1->m_stateHitHead;
    result.m_stateFlipGravity = self->m_player1->m_stateFlipGravity;
    result.m_gravityMod = self->m_player1->m_gravityMod;
    result.m_stateForce = self->m_player1->m_stateForce;
    result.m_stateForceVector = self->m_player1->m_stateForceVector;
    result.m_affectedByForces = self->m_player1->m_affectedByForces;
    // result.m_jumpPadRelated = self->m_player1->m_jumpPadRelated;
    result.m_somethingPlayerSpeedTime = self->m_player1->m_somethingPlayerSpeedTime;
    result.m_playerSpeedAC = self->m_player1->m_playerSpeedAC;
    result.m_fixRobotJump = self->m_player1->m_fixRobotJump;
    // result.m_holdingButtons = self->m_player1->m_holdingButtons;
    result.m_inputsLocked = self->m_player1->m_inputsLocked;
    // result.m_currentRobotAnimation = self->m_player1->m_currentRobotAnimation;
    result.m_gv0123 = self->m_player1->m_gv0123;
    result.m_iconRequestID = self->m_player1->m_iconRequestID;
    // result.m_robotBatchNode = self->m_player1->m_robotBatchNode;
    // result.m_spiderBatchNode = self->m_player1->m_spiderBatchNode;
    result.m_unk958 = self->m_player1->m_unk958;
    // result.m_robotFire = self->m_player1->m_robotFire;
    result.m_unkUnused = self->m_player1->m_unkUnused;
    // result.m_gameLayer = self->m_player1->m_gameLayer;
    // result.m_parentLayer = self->m_player1->m_parentLayer;
    // result.m_actionManager = self->m_player1->m_actionManager;
    result.m_isOutOfBounds = self->m_player1->m_isOutOfBounds;
    result.m_fallStartY = self->m_player1->m_fallStartY;
    result.m_disablePlayerSqueeze = self->m_player1->m_disablePlayerSqueeze;
    result.m_robotHasRun3 = self->m_player1->m_robotHasRun3;
    result.m_robotHasRun2 = self->m_player1->m_robotHasRun2;
    result.m_item20 = self->m_player1->m_item20;
    // result.m_ignoreDamage = self->m_player1->m_ignoreDamage;
    result.m_enable22Changes = self->m_player1->m_enable22Changes;
    
    return result;
}

static checkpoint_data create_checkpoint_p2(PlayLayer* self) {
    checkpoint_data result;
    
    // result.m_mainLayer = self->m_player2->m_mainLayer;
    result.m_wasTeleported = self->m_player2->m_wasTeleported;
    result.m_fixGravityBug = self->m_player2->m_fixGravityBug;
    result.m_reverseSync = self->m_player2->m_reverseSync;
    result.m_yVelocityBeforeSlope = self->m_player2->m_yVelocityBeforeSlope;
    // result.m_dashX = self->m_player2->m_dashX;
    // result.m_dashY = self->m_player2->m_dashY;
    // result.m_dashAngle = self->m_player2->m_dashAngle;
    // result.m_dashStartTime = self->m_player2->m_dashStartTime;
    // result.m_dashRing = self->m_player2->m_dashRing;
    result.m_slopeStartTime = self->m_player2->m_slopeStartTime;
    result.m_justPlacedStreak = self->m_player2->m_justPlacedStreak;
    // result.m_maybeLastGroundObject = self->m_player2->m_maybeLastGroundObject;
    // result.m_collisionLogTop = self->m_player2->m_collisionLogTop;
    // result.m_collisionLogBottom = self->m_player2->m_collisionLogBottom;
    // result.m_collisionLogLeft = self->m_player2->m_collisionLogLeft;
    // result.m_collisionLogRight = self->m_player2->m_collisionLogRight;
    result.m_lastCollisionBottom = self->m_player2->m_lastCollisionBottom;
    result.m_lastCollisionTop = self->m_player2->m_lastCollisionTop;
    result.m_lastCollisionLeft = self->m_player2->m_lastCollisionLeft;
    result.m_lastCollisionRight = self->m_player2->m_lastCollisionRight;
    result.m_unk50C = self->m_player2->m_unk50C;
    result.m_unk510 = self->m_player2->m_unk510;
    // result.m_currentSlope2 = self->m_player2->m_currentSlope2;
    // result.m_preLastGroundObject = self->m_player2->m_preLastGroundObject;
    result.m_slopeAngle = self->m_player2->m_slopeAngle;
    result.m_slopeSlidingMaybeRotated = self->m_player2->m_slopeSlidingMaybeRotated;
    result.m_quickCheckpointMode = self->m_player2->m_quickCheckpointMode;
    // result.m_collidedObject = self->m_player2->m_collidedObject;
    // result.m_lastGroundObject = self->m_player2->m_lastGroundObject;
    // result.m_collidingWithLeft = self->m_player2->m_collidingWithLeft;
    // result.m_collidingWithRight = self->m_player2->m_collidingWithRight;
    result.m_maybeSavedPlayerFrame = self->m_player2->m_maybeSavedPlayerFrame;
    result.m_scaleXRelated2 = self->m_player2->m_scaleXRelated2;
    result.m_groundYVelocity = self->m_player2->m_groundYVelocity;
    result.m_yVelocityRelated = self->m_player2->m_yVelocityRelated;
    result.m_scaleXRelated3 = self->m_player2->m_scaleXRelated3;
    result.m_scaleXRelated4 = self->m_player2->m_scaleXRelated4;
    result.m_scaleXRelated5 = self->m_player2->m_scaleXRelated5;
    result.m_isCollidingWithSlope = self->m_player2->m_isCollidingWithSlope;
    // result.m_dashFireSprite = self->m_player2->m_dashFireSprite;
    result.m_isBallRotating = self->m_player2->m_isBallRotating;
    result.m_unk669 = self->m_player2->m_unk669;
    // result.m_currentSlope3 = self->m_player2->m_currentSlope3;
    // result.m_currentSlope = self->m_player2->m_currentSlope;
    result.unk_584 = self->m_player2->unk_584;
    result.m_collidingWithSlopeId = self->m_player2->m_collidingWithSlopeId;
    result.m_slopeFlipGravityRelated = self->m_player2->m_slopeFlipGravityRelated;
    // result.m_particleSystems = self->m_player2->m_particleSystems;
    result.m_slopeAngleRadians = self->m_player2->m_slopeAngleRadians;
    // result.m_rotateObjectsRelated = self->m_player2->m_rotateObjectsRelated;
    // result.m_maybeRotatedObjectsMap = self->m_player2->m_maybeRotatedObjectsMap;
    result.m_rotationSpeed = self->m_player2->m_rotationSpeed;
    result.m_rotateSpeed = self->m_player2->m_rotateSpeed;
    result.m_isRotating = self->m_player2->m_isRotating;
    result.m_isBallRotating2 = self->m_player2->m_isBallRotating2;
    result.m_hasGlow = self->m_player2->m_hasGlow;
    result.m_isHidden = self->m_player2->m_isHidden;
    // result.m_ghostType = self->m_player2->m_ghostType;
    // result.m_ghostTrail = self->m_player2->m_ghostTrail;
    // result.m_iconSprite = self->m_player2->m_iconSprite;
    // result.m_iconSpriteSecondary = self->m_player2->m_iconSpriteSecondary;
    // result.m_iconSpriteWhitener = self->m_player2->m_iconSpriteWhitener;
    // result.m_iconGlow = self->m_player2->m_iconGlow;
    // result.m_vehicleSprite = self->m_player2->m_vehicleSprite;
    // result.m_vehicleSpriteSecondary = self->m_player2->m_vehicleSpriteSecondary;
    // result.m_birdVehicle = self->m_player2->m_birdVehicle;
    // result.m_vehicleSpriteWhitener = self->m_player2->m_vehicleSpriteWhitener;
    // result.m_vehicleGlow = self->m_player2->m_vehicleGlow;
    // result.m_swingFireMiddle = self->m_player2->m_swingFireMiddle;
    // result.m_swingFireBottom = self->m_player2->m_swingFireBottom;
    // result.m_swingFireTop = self->m_player2->m_swingFireTop;
    // result.m_dashSpritesContainer = self->m_player2->m_dashSpritesContainer;
    // result.m_regularTrail = self->m_player2->m_regularTrail;
    // result.m_shipStreak = self->m_player2->m_shipStreak;
    // result.m_waveTrail = self->m_player2->m_waveTrail;
    result.m_speedMultiplier = self->m_player2->m_speedMultiplier;
    result.m_yStart = self->m_player2->m_yStart;
    result.m_gravity = self->m_player2->m_gravity;
    result.m_trailingParticleLife = self->m_player2->m_trailingParticleLife;
    result.m_unk648 = self->m_player2->m_unk648;
    result.m_gameModeChangedTime = self->m_player2->m_gameModeChangedTime;
    result.m_padRingRelated = self->m_player2->m_padRingRelated;
    result.m_maybeReducedEffects = self->m_player2->m_maybeReducedEffects;
    result.m_maybeIsFalling = self->m_player2->m_maybeIsFalling;
    result.m_shouldTryPlacingCheckpoint = self->m_player2->m_shouldTryPlacingCheckpoint;
    result.m_playEffects = self->m_player2->m_playEffects;
    result.m_maybeCanRunIntoBlocks = self->m_player2->m_maybeCanRunIntoBlocks;
    result.m_hasGroundParticles = self->m_player2->m_hasGroundParticles;
    result.m_hasShipParticles = self->m_player2->m_hasShipParticles;
    result.m_isOnGround3 = self->m_player2->m_isOnGround3;
    result.m_checkpointTimeout = self->m_player2->m_checkpointTimeout;
    result.m_lastCheckpointTime = self->m_player2->m_lastCheckpointTime;
    result.m_lastJumpTime = self->m_player2->m_lastJumpTime;
    result.m_lastFlipTime = self->m_player2->m_lastFlipTime;
    result.m_flashTime = self->m_player2->m_flashTime;
    result.m_flashRelated = self->m_player2->m_flashRelated;
    result.m_flashRelated1 = self->m_player2->m_flashRelated1;
    // result.m_colorRelated2 = self->m_player2->m_colorRelated2;
    // result.m_flashRelated3 = self->m_player2->m_flashRelated3;
    result.m_lastSpiderFlipTime = self->m_player2->m_lastSpiderFlipTime;
    result.m_unkBool5 = self->m_player2->m_unkBool5;
    result.m_maybeIsVehicleGlowing = self->m_player2->m_maybeIsVehicleGlowing;
    result.m_gv0096 = self->m_player2->m_gv0096;
    result.m_gv0100 = self->m_player2->m_gv0100;
    result.m_accelerationOrSpeed = self->m_player2->m_accelerationOrSpeed;
    result.m_snapDistance = self->m_player2->m_snapDistance;
    result.m_ringJumpRelated = self->m_player2->m_ringJumpRelated;
    // result.m_ringRelatedSet = self->m_player2->m_ringRelatedSet;
    // result.m_objectSnappedTo = self->m_player2->m_objectSnappedTo;
    // result.m_pendingCheckpoint = self->m_player2->m_pendingCheckpoint;
    result.m_onFlyCheckpointTries = self->m_player2->m_onFlyCheckpointTries;
    // result.m_robotSprite = self->m_player2->m_robotSprite;
    // result.m_spiderSprite = self->m_player2->m_spiderSprite;
    result.m_maybeSpriteRelated = self->m_player2->m_maybeSpriteRelated;
    // result.m_playerGroundParticles = self->m_player2->m_playerGroundParticles;
    // result.m_trailingParticles = self->m_player2->m_trailingParticles;
    // result.m_shipClickParticles = self->m_player2->m_shipClickParticles;
    // result.m_vehicleGroundParticles = self->m_player2->m_vehicleGroundParticles;
    // result.m_ufoClickParticles = self->m_player2->m_ufoClickParticles;
    // result.m_robotBurstParticles = self->m_player2->m_robotBurstParticles;
    // result.m_dashParticles = self->m_player2->m_dashParticles;
    // result.m_swingBurstParticles1 = self->m_player2->m_swingBurstParticles1;
    // result.m_swingBurstParticles2 = self->m_player2->m_swingBurstParticles2;
    result.m_useLandParticles0 = self->m_player2->m_useLandParticles0;
    // result.m_landParticles0 = self->m_player2->m_landParticles0;
    // result.m_landParticles1 = self->m_player2->m_landParticles1;
    result.m_landParticlesAngle = self->m_player2->m_landParticlesAngle;
    result.m_landParticleRelatedY = self->m_player2->m_landParticleRelatedY;
    result.m_playerStreak = self->m_player2->m_playerStreak;
    result.m_streakRelated1 = self->m_player2->m_streakRelated1;
    result.m_streakRelated2 = self->m_player2->m_streakRelated2;
    result.m_streakRelated3 = self->m_player2->m_streakRelated3;
    // result.m_shipStreakType = self->m_player2->m_shipStreakType;
    result.m_slopeRotation = self->m_player2->m_slopeRotation;
    result.m_currentSlopeYVelocity = self->m_player2->m_currentSlopeYVelocity;
    result.m_unk3d0 = self->m_player2->m_unk3d0;
    result.m_blackOrbRelated = self->m_player2->m_blackOrbRelated;
    result.m_unk3e0 = self->m_player2->m_unk3e0;
    result.m_unk3e1 = self->m_player2->m_unk3e1;
    result.m_isAccelerating = self->m_player2->m_isAccelerating;
    result.m_isCurrentSlopeTop = self->m_player2->m_isCurrentSlopeTop;
    result.m_collidedTopMinY = self->m_player2->m_collidedTopMinY;
    result.m_collidedBottomMaxY = self->m_player2->m_collidedBottomMaxY;
    result.m_collidedLeftMaxX = self->m_player2->m_collidedLeftMaxX;
    result.m_collidedRightMinX = self->m_player2->m_collidedRightMinX;
    result.m_streakRelated4 = self->m_player2->m_streakRelated4;
    result.m_canPlaceCheckpoint = self->m_player2->m_canPlaceCheckpoint;
    // result.m_colorRelated = self->m_player2->m_colorRelated;
    // result.m_secondColorRelated = self->m_player2->m_secondColorRelated;
    result.m_hasCustomGlowColor = self->m_player2->m_hasCustomGlowColor;
    // result.m_glowColor = self->m_player2->m_glowColor;
    result.m_maybeIsColliding = self->m_player2->m_maybeIsColliding;
    result.m_jumpBuffered = self->m_player2->m_jumpBuffered;
    result.m_stateRingJump = self->m_player2->m_stateRingJump;
    result.m_wasJumpBuffered = self->m_player2->m_wasJumpBuffered;
    result.m_wasRobotJump = self->m_player2->m_wasRobotJump;
    result.m_stateJumpBuffered = self->m_player2->m_stateJumpBuffered;
    result.m_stateRingJump2 = self->m_player2->m_stateRingJump2;
    result.m_touchedRing = self->m_player2->m_touchedRing;
    result.m_touchedCustomRing = self->m_player2->m_touchedCustomRing;
    result.m_touchedGravityPortal = self->m_player2->m_touchedGravityPortal;
    result.m_maybeTouchedBreakableBlock = self->m_player2->m_maybeTouchedBreakableBlock;
    result.m_jumpRelatedAC2 = self->m_player2->m_jumpRelatedAC2;
    result.m_touchedPad = self->m_player2->m_touchedPad;
    result.m_yVelocity = self->m_player2->m_yVelocity;
    result.m_fallSpeed = self->m_player2->m_fallSpeed;
    result.m_isOnSlope = self->m_player2->m_isOnSlope;
    result.m_wasOnSlope = self->m_player2->m_wasOnSlope;
    result.m_slopeVelocity = self->m_player2->m_slopeVelocity;
    result.m_maybeUpsideDownSlope = self->m_player2->m_maybeUpsideDownSlope;
    result.m_isShip = self->m_player2->m_isShip;
    result.m_isBird = self->m_player2->m_isBird;
    result.m_isBall = self->m_player2->m_isBall;
    result.m_isDart = self->m_player2->m_isDart;
    result.m_isRobot = self->m_player2->m_isRobot;
    result.m_isSpider = self->m_player2->m_isSpider;
    result.m_isUpsideDown = self->m_player2->m_isUpsideDown;
    result.m_isDead = self->m_player2->m_isDead;
    result.m_isOnGround = self->m_player2->m_isOnGround;
    result.m_isGoingLeft = self->m_player2->m_isGoingLeft;
    result.m_isSideways = self->m_player2->m_isSideways;
    result.m_isSwing = self->m_player2->m_isSwing;
    result.m_reverseRelated = self->m_player2->m_reverseRelated;
    result.m_maybeReverseSpeed = self->m_player2->m_maybeReverseSpeed;
    result.m_maybeReverseAcceleration = self->m_player2->m_maybeReverseAcceleration;
    result.m_xVelocityRelated2 = self->m_player2->m_xVelocityRelated2;
    result.m_isDashing = self->m_player2->m_isDashing;
    result.m_unk9e8 = self->m_player2->m_unk9e8;
    result.m_groundObjectMaterial = self->m_player2->m_groundObjectMaterial;
    result.m_vehicleSize = self->m_player2->m_vehicleSize;
    result.m_playerSpeed = self->m_player2->m_playerSpeed;
    result.m_shipRotation = self->m_player2->m_shipRotation;
    result.m_lastPortalPos = self->m_player2->m_lastPortalPos;
    result.m_unkUnused3 = self->m_player2->m_unkUnused3;
    result.m_isOnGround2 = self->m_player2->m_isOnGround2;
    result.m_lastLandTime = self->m_player2->m_lastLandTime;
    result.m_platformerVelocityRelated = self->m_player2->m_platformerVelocityRelated;
    result.m_maybeIsBoosted = self->m_player2->m_maybeIsBoosted;
    result.m_scaleXRelatedTime = self->m_player2->m_scaleXRelatedTime;
    result.m_decreaseBoostSlide = self->m_player2->m_decreaseBoostSlide;
    result.m_unkA29 = self->m_player2->m_unkA29;
    result.m_isLocked = self->m_player2->m_isLocked;
    result.m_controlsDisabled = self->m_player2->m_controlsDisabled;
    result.m_lastGroundedPos = self->m_player2->m_lastGroundedPos;
    // result.m_touchingRings = self->m_player2->m_touchingRings;
    // result.m_touchedRings = self->m_player2->m_touchedRings;
    // result.m_lastActivatedPortal = self->m_player2->m_lastActivatedPortal;
    result.m_hasEverJumped = self->m_player2->m_hasEverJumped;
    result.m_ringOrStreakRelated = self->m_player2->m_ringOrStreakRelated;
    // result.m_playerColor1 = self->m_player2->m_playerColor1;
    // result.m_playerColor2 = self->m_player2->m_playerColor2;
    result.m_position = self->m_player2->m_position;
    result.m_isSecondPlayer = self->m_player2->m_isSecondPlayer;
    result.m_unkA99 = self->m_player2->m_unkA99;
    result.m_totalTime = self->m_player2->m_totalTime;
    result.m_isBeingSpawnedByDualPortal = self->m_player2->m_isBeingSpawnedByDualPortal;
    result.m_unkAAC = self->m_player2->m_unkAAC;
    result.m_unkAngle1 = self->m_player2->m_unkAngle1;
    result.m_yVelocityRelated3 = self->m_player2->m_yVelocityRelated3;
    result.m_gamevar0060 = self->m_player2->m_gamevar0060;
    result.m_swapColors = self->m_player2->m_swapColors;
    result.m_gamevar0062 = self->m_player2->m_gamevar0062;
    result.m_followRelated = self->m_player2->m_followRelated;
    // result.m_playerFollowFloats = self->m_player2->m_playerFollowFloats;
    result.m_unk838 = self->m_player2->m_unk838;
    result.m_stateOnGround = self->m_player2->m_stateOnGround;
    result.m_stateUnk = self->m_player2->m_stateUnk;
    result.m_stateNoStickX = self->m_player2->m_stateNoStickX;
    result.m_stateNoStickY = self->m_player2->m_stateNoStickY;
    result.m_stateUnk2 = self->m_player2->m_stateUnk2;
    result.m_stateBoostX = self->m_player2->m_stateBoostX;
    result.m_stateBoostY = self->m_player2->m_stateBoostY;
    result.m_maybeStateForce2 = self->m_player2->m_maybeStateForce2;
    result.m_stateScale = self->m_player2->m_stateScale;
    result.m_platformerXVelocity = self->m_player2->m_platformerXVelocity;
    result.m_holdingRight = self->m_player2->m_holdingRight;
    result.m_holdingLeft = self->m_player2->m_holdingLeft;
    result.m_leftPressedFirst = self->m_player2->m_leftPressedFirst;
    result.m_scaleXRelated = self->m_player2->m_scaleXRelated;
    result.m_maybeHasStopped = self->m_player2->m_maybeHasStopped;
    result.m_xVelocityRelated = self->m_player2->m_xVelocityRelated;
    result.m_maybeGoingCorrectSlopeDirection = self->m_player2->m_maybeGoingCorrectSlopeDirection;
    result.m_isSliding = self->m_player2->m_isSliding;
    result.m_maybeSlopeForce = self->m_player2->m_maybeSlopeForce;
    result.m_isOnIce = self->m_player2->m_isOnIce;
    result.m_physDeltaRelated = self->m_player2->m_physDeltaRelated;
    result.m_isOnGround4 = self->m_player2->m_isOnGround4;
    result.m_maybeSlidingTime = self->m_player2->m_maybeSlidingTime;
    result.m_maybeSlidingStartTime = self->m_player2->m_maybeSlidingStartTime;
    result.m_changedDirectionsTime = self->m_player2->m_changedDirectionsTime;
    result.m_slopeEndTime = self->m_player2->m_slopeEndTime;
    result.m_isMoving = self->m_player2->m_isMoving;
    result.m_platformerMovingLeft = self->m_player2->m_platformerMovingLeft;
    result.m_platformerMovingRight = self->m_player2->m_platformerMovingRight;
    result.m_isSlidingRight = self->m_player2->m_isSlidingRight;
    result.m_maybeChangedDirectionAngle = self->m_player2->m_maybeChangedDirectionAngle;
    result.m_unkUnused2 = self->m_player2->m_unkUnused2;
    result.m_isPlatformer = self->m_player2->m_isPlatformer;
    result.m_stateNoAutoJump = self->m_player2->m_stateNoAutoJump;
    result.m_stateDartSlide = self->m_player2->m_stateDartSlide;
    result.m_stateHitHead = self->m_player2->m_stateHitHead;
    result.m_stateFlipGravity = self->m_player2->m_stateFlipGravity;
    result.m_gravityMod = self->m_player2->m_gravityMod;
    result.m_stateForce = self->m_player2->m_stateForce;
    result.m_stateForceVector = self->m_player2->m_stateForceVector;
    result.m_affectedByForces = self->m_player2->m_affectedByForces;
    // result.m_jumpPadRelated = self->m_player2->m_jumpPadRelated;
    result.m_somethingPlayerSpeedTime = self->m_player2->m_somethingPlayerSpeedTime;
    result.m_playerSpeedAC = self->m_player2->m_playerSpeedAC;
    result.m_fixRobotJump = self->m_player2->m_fixRobotJump;
    // result.m_holdingButtons = self->m_player2->m_holdingButtons;
    result.m_inputsLocked = self->m_player2->m_inputsLocked;
    // result.m_currentRobotAnimation = self->m_player2->m_currentRobotAnimation;
    result.m_gv0123 = self->m_player2->m_gv0123;
    result.m_iconRequestID = self->m_player2->m_iconRequestID;
    // result.m_robotBatchNode = self->m_player2->m_robotBatchNode;
    // result.m_spiderBatchNode = self->m_player2->m_spiderBatchNode;
    result.m_unk958 = self->m_player2->m_unk958;
    // result.m_robotFire = self->m_player2->m_robotFire;
    result.m_unkUnused = self->m_player2->m_unkUnused;
    // result.m_gameLayer = self->m_player2->m_gameLayer;
    // result.m_parentLayer = self->m_player2->m_parentLayer;
    // result.m_actionManager = self->m_player2->m_actionManager;
    result.m_isOutOfBounds = self->m_player2->m_isOutOfBounds;
    result.m_fallStartY = self->m_player2->m_fallStartY;
    result.m_disablePlayerSqueeze = self->m_player2->m_disablePlayerSqueeze;
    result.m_robotHasRun3 = self->m_player2->m_robotHasRun3;
    result.m_robotHasRun2 = self->m_player2->m_robotHasRun2;
    result.m_item20 = self->m_player2->m_item20;
    // result.m_ignoreDamage = self->m_player2->m_ignoreDamage;
    result.m_enable22Changes = self->m_player2->m_enable22Changes;
    
    return result;
}

static void apply_checkpoint(PlayerObject* player, checkpoint_data checkpoint) {
    // player->m_mainLayer = checkpoint.m_mainLayer;
    player->m_wasTeleported = checkpoint.m_wasTeleported;
    player->m_fixGravityBug = checkpoint.m_fixGravityBug;
    player->m_reverseSync = checkpoint.m_reverseSync;
    player->m_yVelocityBeforeSlope = checkpoint.m_yVelocityBeforeSlope;
    // player->m_dashX = checkpoint.m_dashX;
    // player->m_dashY = checkpoint.m_dashY;
    // player->m_dashAngle = checkpoint.m_dashAngle;
    // player->m_dashStartTime = checkpoint.m_dashStartTime;
    // player->m_dashRing = checkpoint.m_dashRing;
    player->m_slopeStartTime = checkpoint.m_slopeStartTime;
    player->m_justPlacedStreak = checkpoint.m_justPlacedStreak;
    // player->m_maybeLastGroundObject = checkpoint.m_maybeLastGroundObject;
    // player->m_collisionLogTop = checkpoint.m_collisionLogTop;
    // player->m_collisionLogBottom = checkpoint.m_collisionLogBottom;
    // player->m_collisionLogLeft = checkpoint.m_collisionLogLeft;
    // player->m_collisionLogRight = checkpoint.m_collisionLogRight;
    player->m_lastCollisionBottom = checkpoint.m_lastCollisionBottom;
    player->m_lastCollisionTop = checkpoint.m_lastCollisionTop;
    player->m_lastCollisionLeft = checkpoint.m_lastCollisionLeft;
    player->m_lastCollisionRight = checkpoint.m_lastCollisionRight;
    player->m_unk50C = checkpoint.m_unk50C;
    player->m_unk510 = checkpoint.m_unk510;
    // player->m_currentSlope2 = checkpoint.m_currentSlope2;
    // player->m_preLastGroundObject = checkpoint.m_preLastGroundObject;
    player->m_slopeAngle = checkpoint.m_slopeAngle;
    player->m_slopeSlidingMaybeRotated = checkpoint.m_slopeSlidingMaybeRotated;
    player->m_quickCheckpointMode = checkpoint.m_quickCheckpointMode;
    // player->m_collidedObject = checkpoint.m_collidedObject;
    // player->m_lastGroundObject = checkpoint.m_lastGroundObject;
    // player->m_collidingWithLeft = checkpoint.m_collidingWithLeft;
    // player->m_collidingWithRight = checkpoint.m_collidingWithRight;
    player->m_maybeSavedPlayerFrame = checkpoint.m_maybeSavedPlayerFrame;
    player->m_scaleXRelated2 = checkpoint.m_scaleXRelated2;
    player->m_groundYVelocity = checkpoint.m_groundYVelocity;
    player->m_yVelocityRelated = checkpoint.m_yVelocityRelated;
    player->m_scaleXRelated3 = checkpoint.m_scaleXRelated3;
    player->m_scaleXRelated4 = checkpoint.m_scaleXRelated4;
    player->m_scaleXRelated5 = checkpoint.m_scaleXRelated5;
    player->m_isCollidingWithSlope = checkpoint.m_isCollidingWithSlope;
    // player->m_dashFireSprite = checkpoint.m_dashFireSprite;
    player->m_isBallRotating = checkpoint.m_isBallRotating;
    player->m_unk669 = checkpoint.m_unk669;
    // player->m_currentSlope3 = checkpoint.m_currentSlope3;
    // player->m_currentSlope = checkpoint.m_currentSlope;
    player->unk_584 = checkpoint.unk_584;
    player->m_collidingWithSlopeId = checkpoint.m_collidingWithSlopeId;
    player->m_slopeFlipGravityRelated = checkpoint.m_slopeFlipGravityRelated;
    // player->m_particleSystems = checkpoint.m_particleSystems;
    player->m_slopeAngleRadians = checkpoint.m_slopeAngleRadians;
    // player->m_rotateObjectsRelated = checkpoint.m_rotateObjectsRelated;
    // player->m_maybeRotatedObjectsMap = checkpoint.m_maybeRotatedObjectsMap;
    player->m_rotationSpeed = checkpoint.m_rotationSpeed;
    player->m_rotateSpeed = checkpoint.m_rotateSpeed;
    player->m_isRotating = checkpoint.m_isRotating;
    player->m_isBallRotating2 = checkpoint.m_isBallRotating2;
    player->m_hasGlow = checkpoint.m_hasGlow;
    player->m_isHidden = checkpoint.m_isHidden;
    // player->m_ghostType = checkpoint.m_ghostType;
    // player->m_ghostTrail = checkpoint.m_ghostTrail;
    // player->m_iconSprite = checkpoint.m_iconSprite;
    // player->m_iconSpriteSecondary = checkpoint.m_iconSpriteSecondary;
    // player->m_iconSpriteWhitener = checkpoint.m_iconSpriteWhitener;
    // player->m_iconGlow = checkpoint.m_iconGlow;
    // player->m_vehicleSprite = checkpoint.m_vehicleSprite;
    // player->m_vehicleSpriteSecondary = checkpoint.m_vehicleSpriteSecondary;
    // player->m_birdVehicle = checkpoint.m_birdVehicle;
    // player->m_vehicleSpriteWhitener = checkpoint.m_vehicleSpriteWhitener;
    // player->m_vehicleGlow = checkpoint.m_vehicleGlow;
    // player->m_swingFireMiddle = checkpoint.m_swingFireMiddle;
    // player->m_swingFireBottom = checkpoint.m_swingFireBottom;
    // player->m_swingFireTop = checkpoint.m_swingFireTop;
    // player->m_dashSpritesContainer = checkpoint.m_dashSpritesContainer;
    // player->m_regularTrail = checkpoint.m_regularTrail;
    // player->m_shipStreak = checkpoint.m_shipStreak;
    // player->m_waveTrail = checkpoint.m_waveTrail;
    player->m_speedMultiplier = checkpoint.m_speedMultiplier;
    player->m_yStart = checkpoint.m_yStart;
    player->m_gravity = checkpoint.m_gravity;
    player->m_trailingParticleLife = checkpoint.m_trailingParticleLife;
    player->m_unk648 = checkpoint.m_unk648;
    player->m_gameModeChangedTime = checkpoint.m_gameModeChangedTime;
    player->m_padRingRelated = checkpoint.m_padRingRelated;
    player->m_maybeReducedEffects = checkpoint.m_maybeReducedEffects;
    player->m_maybeIsFalling = checkpoint.m_maybeIsFalling;
    player->m_shouldTryPlacingCheckpoint = checkpoint.m_shouldTryPlacingCheckpoint;
    player->m_playEffects = checkpoint.m_playEffects;
    player->m_maybeCanRunIntoBlocks = checkpoint.m_maybeCanRunIntoBlocks;
    player->m_hasGroundParticles = checkpoint.m_hasGroundParticles;
    player->m_hasShipParticles = checkpoint.m_hasShipParticles;
    player->m_isOnGround3 = checkpoint.m_isOnGround3;
    player->m_checkpointTimeout = checkpoint.m_checkpointTimeout;
    player->m_lastCheckpointTime = checkpoint.m_lastCheckpointTime;
    player->m_lastJumpTime = checkpoint.m_lastJumpTime;
    player->m_lastFlipTime = checkpoint.m_lastFlipTime;
    player->m_flashTime = checkpoint.m_flashTime;
    player->m_flashRelated = checkpoint.m_flashRelated;
    player->m_flashRelated1 = checkpoint.m_flashRelated1;
    // player->m_colorRelated2 = checkpoint.m_colorRelated2;
    // player->m_flashRelated3 = checkpoint.m_flashRelated3;
    player->m_lastSpiderFlipTime = checkpoint.m_lastSpiderFlipTime;
    player->m_unkBool5 = checkpoint.m_unkBool5;
    player->m_maybeIsVehicleGlowing = checkpoint.m_maybeIsVehicleGlowing;
    player->m_gv0096 = checkpoint.m_gv0096;
    player->m_gv0100 = checkpoint.m_gv0100;
    player->m_accelerationOrSpeed = checkpoint.m_accelerationOrSpeed;
    player->m_snapDistance = checkpoint.m_snapDistance;
    player->m_ringJumpRelated = checkpoint.m_ringJumpRelated;
    // player->m_ringRelatedSet = checkpoint.m_ringRelatedSet;
    // player->m_objectSnappedTo = checkpoint.m_objectSnappedTo;
    // player->m_pendingCheckpoint = checkpoint.m_pendingCheckpoint;
    player->m_onFlyCheckpointTries = checkpoint.m_onFlyCheckpointTries;
    // player->m_robotSprite = checkpoint.m_robotSprite;
    // player->m_spiderSprite = checkpoint.m_spiderSprite;
    player->m_maybeSpriteRelated = checkpoint.m_maybeSpriteRelated;
    // player->m_playerGroundParticles = checkpoint.m_playerGroundParticles;
    // player->m_trailingParticles = checkpoint.m_trailingParticles;
    // player->m_shipClickParticles = checkpoint.m_shipClickParticles;
    // player->m_vehicleGroundParticles = checkpoint.m_vehicleGroundParticles;
    // player->m_ufoClickParticles = checkpoint.m_ufoClickParticles;
    // player->m_robotBurstParticles = checkpoint.m_robotBurstParticles;
    // player->m_dashParticles = checkpoint.m_dashParticles;
    // player->m_swingBurstParticles1 = checkpoint.m_swingBurstParticles1;
    // player->m_swingBurstParticles2 = checkpoint.m_swingBurstParticles2;
    player->m_useLandParticles0 = checkpoint.m_useLandParticles0;
    // player->m_landParticles0 = checkpoint.m_landParticles0;
    // player->m_landParticles1 = checkpoint.m_landParticles1;
    player->m_landParticlesAngle = checkpoint.m_landParticlesAngle;
    player->m_landParticleRelatedY = checkpoint.m_landParticleRelatedY;
    player->m_playerStreak = checkpoint.m_playerStreak;
    player->m_streakRelated1 = checkpoint.m_streakRelated1;
    player->m_streakRelated2 = checkpoint.m_streakRelated2;
    player->m_streakRelated3 = checkpoint.m_streakRelated3;
    // player->m_shipStreakType = checkpoint.m_shipStreakType;
    player->m_slopeRotation = checkpoint.m_slopeRotation;
    player->m_currentSlopeYVelocity = checkpoint.m_currentSlopeYVelocity;
    player->m_unk3d0 = checkpoint.m_unk3d0;
    player->m_blackOrbRelated = checkpoint.m_blackOrbRelated;
    player->m_unk3e0 = checkpoint.m_unk3e0;
    player->m_unk3e1 = checkpoint.m_unk3e1;
    player->m_isAccelerating = checkpoint.m_isAccelerating;
    player->m_isCurrentSlopeTop = checkpoint.m_isCurrentSlopeTop;
    player->m_collidedTopMinY = checkpoint.m_collidedTopMinY;
    player->m_collidedBottomMaxY = checkpoint.m_collidedBottomMaxY;
    player->m_collidedLeftMaxX = checkpoint.m_collidedLeftMaxX;
    player->m_collidedRightMinX = checkpoint.m_collidedRightMinX;
    player->m_streakRelated4 = checkpoint.m_streakRelated4;
    player->m_canPlaceCheckpoint = checkpoint.m_canPlaceCheckpoint;
    // player->m_colorRelated = checkpoint.m_colorRelated;
    // player->m_secondColorRelated = checkpoint.m_secondColorRelated;
    player->m_hasCustomGlowColor = checkpoint.m_hasCustomGlowColor;
    // player->m_glowColor = checkpoint.m_glowColor;
    player->m_maybeIsColliding = checkpoint.m_maybeIsColliding;
    if (input_buffer) player->m_jumpBuffered = checkpoint.m_jumpBuffered;
    player->m_stateRingJump = checkpoint.m_stateRingJump;
    if (input_buffer) player->m_wasJumpBuffered = checkpoint.m_wasJumpBuffered;
    player->m_wasRobotJump = checkpoint.m_wasRobotJump;
    if (input_buffer) player->m_stateJumpBuffered = checkpoint.m_stateJumpBuffered;
    player->m_stateRingJump2 = checkpoint.m_stateRingJump2;
    player->m_touchedRing = checkpoint.m_touchedRing;
    player->m_touchedCustomRing = checkpoint.m_touchedCustomRing;
    player->m_touchedGravityPortal = checkpoint.m_touchedGravityPortal;
    player->m_maybeTouchedBreakableBlock = checkpoint.m_maybeTouchedBreakableBlock;
    player->m_jumpRelatedAC2 = checkpoint.m_jumpRelatedAC2;
    player->m_touchedPad = checkpoint.m_touchedPad;
    player->m_yVelocity = checkpoint.m_yVelocity;
    player->m_fallSpeed = checkpoint.m_fallSpeed;
    player->m_isOnSlope = checkpoint.m_isOnSlope;
    player->m_wasOnSlope = checkpoint.m_wasOnSlope;
    player->m_slopeVelocity = checkpoint.m_slopeVelocity;
    player->m_maybeUpsideDownSlope = checkpoint.m_maybeUpsideDownSlope;
    player->m_isShip = checkpoint.m_isShip;
    player->m_isBird = checkpoint.m_isBird;
    player->m_isBall = checkpoint.m_isBall;
    player->m_isDart = checkpoint.m_isDart;
    player->m_isRobot = checkpoint.m_isRobot;
    player->m_isSpider = checkpoint.m_isSpider;
    player->m_isUpsideDown = checkpoint.m_isUpsideDown;
    player->m_isDead = checkpoint.m_isDead;
    player->m_isOnGround = checkpoint.m_isOnGround;
    player->m_isGoingLeft = checkpoint.m_isGoingLeft;
    player->m_isSideways = checkpoint.m_isSideways;
    player->m_isSwing = checkpoint.m_isSwing;
    player->m_reverseRelated = checkpoint.m_reverseRelated;
    player->m_maybeReverseSpeed = checkpoint.m_maybeReverseSpeed;
    player->m_maybeReverseAcceleration = checkpoint.m_maybeReverseAcceleration;
    player->m_xVelocityRelated2 = checkpoint.m_xVelocityRelated2;
    if (input_buffer) player->m_isDashing = checkpoint.m_isDashing;
    player->m_unk9e8 = checkpoint.m_unk9e8;
    player->m_groundObjectMaterial = checkpoint.m_groundObjectMaterial;
    player->m_vehicleSize = checkpoint.m_vehicleSize;
    player->m_playerSpeed = checkpoint.m_playerSpeed;
    player->m_shipRotation = checkpoint.m_shipRotation;
    player->m_lastPortalPos = checkpoint.m_lastPortalPos;
    player->m_unkUnused3 = checkpoint.m_unkUnused3;
    player->m_isOnGround2 = checkpoint.m_isOnGround2;
    player->m_lastLandTime = checkpoint.m_lastLandTime;
    player->m_platformerVelocityRelated = checkpoint.m_platformerVelocityRelated;
    player->m_maybeIsBoosted = checkpoint.m_maybeIsBoosted;
    player->m_scaleXRelatedTime = checkpoint.m_scaleXRelatedTime;
    player->m_decreaseBoostSlide = checkpoint.m_decreaseBoostSlide;
    player->m_unkA29 = checkpoint.m_unkA29;
    player->m_isLocked = checkpoint.m_isLocked;
    player->m_controlsDisabled = checkpoint.m_controlsDisabled;
    player->m_lastGroundedPos = checkpoint.m_lastGroundedPos;
    // player->m_touchingRings = checkpoint.m_touchingRings;
    // player->m_touchedRings = checkpoint.m_touchedRings;
    // player->m_lastActivatedPortal = checkpoint.m_lastActivatedPortal;
    player->m_hasEverJumped = checkpoint.m_hasEverJumped;
    player->m_ringOrStreakRelated = checkpoint.m_ringOrStreakRelated;
    // player->m_playerColor1 = checkpoint.m_playerColor1;
    // player->m_playerColor2 = checkpoint.m_playerColor2;
    player->m_position = checkpoint.m_position;
    player->m_isSecondPlayer = checkpoint.m_isSecondPlayer;
    player->m_unkA99 = checkpoint.m_unkA99;
    player->m_totalTime = checkpoint.m_totalTime;
    player->m_isBeingSpawnedByDualPortal = checkpoint.m_isBeingSpawnedByDualPortal;
    player->m_unkAAC = checkpoint.m_unkAAC;
    player->m_unkAngle1 = checkpoint.m_unkAngle1;
    player->m_yVelocityRelated3 = checkpoint.m_yVelocityRelated3;
    player->m_gamevar0060 = checkpoint.m_gamevar0060;
    player->m_swapColors = checkpoint.m_swapColors;
    player->m_gamevar0062 = checkpoint.m_gamevar0062;
    player->m_followRelated = checkpoint.m_followRelated;
    // player->m_playerFollowFloats = checkpoint.m_playerFollowFloats;
    player->m_unk838 = checkpoint.m_unk838;
    player->m_stateOnGround = checkpoint.m_stateOnGround;
    player->m_stateUnk = checkpoint.m_stateUnk;
    player->m_stateNoStickX = checkpoint.m_stateNoStickX;
    player->m_stateNoStickY = checkpoint.m_stateNoStickY;
    player->m_stateUnk2 = checkpoint.m_stateUnk2;
    player->m_stateBoostX = checkpoint.m_stateBoostX;
    player->m_stateBoostY = checkpoint.m_stateBoostY;
    player->m_maybeStateForce2 = checkpoint.m_maybeStateForce2;
    player->m_stateScale = checkpoint.m_stateScale;
    player->m_platformerXVelocity = checkpoint.m_platformerXVelocity;
    if (input_buffer) player->m_holdingRight = checkpoint.m_holdingRight;
    if (input_buffer) player->m_holdingLeft = checkpoint.m_holdingLeft;
    player->m_leftPressedFirst = checkpoint.m_leftPressedFirst;
    player->m_scaleXRelated = checkpoint.m_scaleXRelated;
    player->m_maybeHasStopped = checkpoint.m_maybeHasStopped;
    player->m_xVelocityRelated = checkpoint.m_xVelocityRelated;
    player->m_maybeGoingCorrectSlopeDirection = checkpoint.m_maybeGoingCorrectSlopeDirection;
    player->m_isSliding = checkpoint.m_isSliding;
    player->m_maybeSlopeForce = checkpoint.m_maybeSlopeForce;
    player->m_isOnIce = checkpoint.m_isOnIce;
    player->m_physDeltaRelated = checkpoint.m_physDeltaRelated;
    player->m_isOnGround4 = checkpoint.m_isOnGround4;
    player->m_maybeSlidingTime = checkpoint.m_maybeSlidingTime;
    player->m_maybeSlidingStartTime = checkpoint.m_maybeSlidingStartTime;
    player->m_changedDirectionsTime = checkpoint.m_changedDirectionsTime;
    player->m_slopeEndTime = checkpoint.m_slopeEndTime;
    player->m_isMoving = checkpoint.m_isMoving;
    player->m_platformerMovingLeft = checkpoint.m_platformerMovingLeft;
    player->m_platformerMovingRight = checkpoint.m_platformerMovingRight;
    player->m_isSlidingRight = checkpoint.m_isSlidingRight;
    player->m_maybeChangedDirectionAngle = checkpoint.m_maybeChangedDirectionAngle;
    player->m_unkUnused2 = checkpoint.m_unkUnused2;
    player->m_isPlatformer = checkpoint.m_isPlatformer;
    player->m_stateNoAutoJump = checkpoint.m_stateNoAutoJump;
    player->m_stateDartSlide = checkpoint.m_stateDartSlide;
    player->m_stateHitHead = checkpoint.m_stateHitHead;
    player->m_stateFlipGravity = checkpoint.m_stateFlipGravity;
    player->m_gravityMod = checkpoint.m_gravityMod;
    player->m_stateForce = checkpoint.m_stateForce;
    player->m_stateForceVector = checkpoint.m_stateForceVector;
    player->m_affectedByForces = checkpoint.m_affectedByForces;
    // player->m_jumpPadRelated = checkpoint.m_jumpPadRelated;
    player->m_somethingPlayerSpeedTime = checkpoint.m_somethingPlayerSpeedTime;
    player->m_playerSpeedAC = checkpoint.m_playerSpeedAC;
    player->m_fixRobotJump = checkpoint.m_fixRobotJump;
    // player->m_holdingButtons = checkpoint.m_holdingButtons;
    player->m_inputsLocked = checkpoint.m_inputsLocked;
    // player->m_currentRobotAnimation = checkpoint.m_currentRobotAnimation;
    player->m_gv0123 = checkpoint.m_gv0123;
    player->m_iconRequestID = checkpoint.m_iconRequestID;
    // player->m_robotBatchNode = checkpoint.m_robotBatchNode;
    // player->m_spiderBatchNode = checkpoint.m_spiderBatchNode;
    player->m_unk958 = checkpoint.m_unk958;
    // player->m_robotFire = checkpoint.m_robotFire;
    player->m_unkUnused = checkpoint.m_unkUnused;
    // player->m_gameLayer = checkpoint.m_gameLayer;
    // player->m_parentLayer = checkpoint.m_parentLayer;
    // player->m_actionManager = checkpoint.m_actionManager;
    player->m_isOutOfBounds = checkpoint.m_isOutOfBounds;
    player->m_fallStartY = checkpoint.m_fallStartY;
    player->m_disablePlayerSqueeze = checkpoint.m_disablePlayerSqueeze;
    player->m_robotHasRun3 = checkpoint.m_robotHasRun3;
    player->m_robotHasRun2 = checkpoint.m_robotHasRun2;
    player->m_item20 = checkpoint.m_item20;
    // player->m_ignoreDamage = checkpoint.m_ignoreDamage;
    player->m_enable22Changes = checkpoint.m_enable22Changes;
}