Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PlayerMovement *__thiscall setPredictionUpdate(QuantizedPrediction *this, PlayerMovement *a2)
- {
- // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
- result = a2;
- a2->grid = this->grid;
- _mm_storel_epi64((__m128i *)&a2->x, _mm_loadl_epi64((const __m128i *)&this->x));
- a2->z = this->z;
- a2->heading = (float)this->heading * 0.015625;
- a2->pitch = (float)this->pitch * 0.015625;
- a2->roll = (float)this->roll * 0.015625;
- v3 = this->velocityY;
- *(float *)&v9 = (float)this->velocityX * 0.03125;
- v4 = (float)v3;
- v5 = this->velocityZ;
- *((float *)&v9 + 1) = v4 * 0.03125;
- v10 = (float)v5 * 0.03125;
- _mm_storel_epi64((__m128i *)&a2->velocityX, _mm_loadl_epi64((const __m128i *)&v9));
- a2->velocityZ = (float)v5 * 0.03125;
- v6 = this->unkVecY;
- *(float *)&v9 = (float)this->unkVecX * 0.000061035156;
- v7 = (float)v6;
- v8 = this->unkVecZ;
- *((float *)&v9 + 1) = v7 * 0.000061035156;
- v10 = (float)v8 * 0.000061035156;
- _mm_storel_epi64((__m128i *)&a2->unkVecX, _mm_loadl_epi64((const __m128i *)&v9));
- a2->unkVecZ = (float)v8 * 0.000061035156;
- a2->flags = this->flags;
- a2->desiredRoll = this->desiredRoll;
- a2->movementMode = this->movementMode;
- a2->desiredHeading = (float)this->desiredHeading * 0.015625;
- a2->desiredPitch = (float)this->desiredPitch * 0.015625;
- a2->desiredHeadingVelocity = (float)this->desiredHeadingVelocity * 0.03125;
- a2->posUnk52 = (float)this->unk52 * 0.03125;
- a2->collisionRadius = (float)this->collisionRadius * 0.03125;
- a2->collisionMultiplier = this->collisionMultiplier;
- a2->posUnkFloat64 = this->unkFloat64;
- a2->speedModifier = (float)this->speedModifier * 0.03125;
- a2->swimmingSpeedModifier = (float)this->swimmingSpeedModifier * 0.03125;
- a2->unkSpeed3 = (float)this->unkSpeed3 * 0.03125;
- a2->desiredVertSpeed = (float)this->desiredVertSpeed * 0.03125;
- a2->desiredStrafeSpeed = (float)this->desiredStrafeSpeed * 0.03125;
- a2->flyingSpeedModifier = (float)this->flyingSpeedModifier * 0.03125;
- a2->desiredForwardSpeed = (float)this->desiredForwardSpeed * 0.00390625;
- a2->desiredRollVelocity = (float)this->desiredRollVelocity * 0.00390625;
- a2->desiredPitchVelocity = (float)this->desiredPitchVelocity * 0.00390625;
- a2->collisionScale = (float)this->collisionScale * 0.000061035156;
- a2->posUnk70Float = (float)this->unk70 * 0.00390625;
- a2->unkByte = this->unkByte;
- _mm_storel_epi64((__m128i *)&a2->destLocX, _mm_loadl_epi64((const __m128i *)&this->destLocX));
- a2->destLocZ = this->destLocZ;
- _mm_storel_epi64((__m128i *)&a2->destLocX2, _mm_loadl_epi64((const __m128i *)&this->destLocX2));
- a2->destLocZ2 = this->destLocZ2;
- a2->faceActorID = this->faceActorID;
- a2->actorStopRange = (float)this->actorStopRange * 0.03125;
- return result;
- }
- struct PlayerMovement {
- /*0x00*/ unsigned int flags;
- /*0x04*/ float desiredRoll;
- /*0x08*/ float desiredHeading;
- /*0x0c*/ float desiredPitch;
- /*0x10*/ unsigned char unusedInPosPacket[0x14 - 0x10];
- /*0x14*/ float desiredHeadingVelocity;
- /*0x18*/ float posUnk52;
- /*0x1c*/ float collisionRadius;
- /*0x20*/ float collisionMultiplier;
- /*0x24*/ float posUnkFloat64;
- /*0x28*/ float speedModifier;
- /*0x2c*/ float swimmingSpeedModifier;
- /*0x30*/ float desiredStrafeSpeed;
- /*0x34*/ float desiredVertSpeed;
- /*0x38*/ float unkSpeed3;
- /*0x3c*/ float flyingSpeedModifier;
- /*0x40*/ float desiredForwardSpeed;
- /*0x44*/ float desiredRollVelocity;
- /*0x48*/ float desiredPitchVelocity; //unk
- /*0x4c*/ float destLocX;
- /*0x50*/ float destLocY;
- /*0x54*/ float destLocZ;
- /*0x58*/ float destLocX2;
- /*0x5c*/ float destLocY2;
- /*0x60*/ float destLocZ2;
- /*0x64*/ float unkVecX;
- /*0x68*/ float unkVecY;
- /*0x6c*/ float unkVecZ;
- /*0x70*/ unsigned int faceActorID;
- /*0x74*/ float actorStopRange;
- /*0x78*/ float collisionScale;
- /*0x7c*/ float posUnk70Float;
- /*0x80*/ unsigned char movementMode;
- /*0x81*/ unsigned char unkByte;
- /*0x82*/ unsigned char zz_align82[2];
- /*0x84*/ unsigned int grid;
- /*0x88*/ float x;
- /*0x8c*/ float y;
- /*0x90*/ float z;
- /*0x94*/ float heading;
- /*0x98*/ float pitch;
- /*0x9c*/ float roll;
- /*0xa0*/ float velocityX;
- /*0xa4*/ float velocityY;
- /*0xa8*/ float velocityZ;
- /*0xac*/
- };
- struct QuantizedPrediction {
- /*0x00*/ unsigned int grid;
- /*0x04*/ float x;
- /*0x08*/ float y;
- /*0x0c*/ float z;
- /*0x10*/ unsigned short velocityX;
- /*0x12*/ unsigned short velocityY;
- /*0x14*/ unsigned short velocityZ;
- /*0x16*/ unsigned short heading;
- /*0x18*/ unsigned short desiredHeading;
- /*0x1a*/ unsigned short desiredForwardSpeed;
- /*0x1c*/ unsigned int flags;
- /*0x20*/ float desiredRoll; //guess
- /*0x24*/ float destLocX;
- /*0x28*/ float destLocY;
- /*0x2c*/ float destLocZ;
- /*0x30*/ float destLocX2;
- /*0x34*/ float destLocY2;
- /*0x38*/ float destLocZ2;
- /*0x3c*/ unsigned char movementMode;
- /*0x3d*/ unsigned char unkByte;
- /*0x3e*/ unsigned short desiredHeadingVelocity;//guessing most of these, all shorts
- /*0x40*/ unsigned short speedModifier;
- /*0x42*/ unsigned short swimmingSpeedModifier;
- /*0x44*/ unsigned short flyingSpeedModifier;
- /*0x46*/ unsigned short desiredStrafeSpeed;
- /*0x48*/ unsigned short desiredVertSpeed;
- /*0x4a*/ unsigned short unkSpeed3;
- /*0x4c*/ unsigned short desiredRollVelocity;
- /*0x4e*/ unsigned short desiredPitchVelocity;
- /*0x50*/ unsigned short desiredPitch;
- /*0x52*/ unsigned short unk52;
- /*0x54*/ unsigned short unkVecX;
- /*0x56*/ unsigned short unkVecY;
- /*0x58*/ unsigned short unkVecZ;
- /*0x5a*/ unsigned short pitch;
- /*0x5c*/ unsigned short collisionRadius;
- /*0x5e*/ unsigned short collisionScale;
- /*0x60*/ float collisionMultiplier;
- /*0x64*/ float unkFloat64;
- /*0x68*/ unsigned int faceActorID;
- /*0x6c*/ unsigned short actorStopRange;
- /*0x6e*/ unsigned short roll;
- /*0x70*/ unsigned short unk70;
- /*0x72*/ unsigned short unk72;
- /*0x74*/
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement