G2A Many GEOs
SHARE
TWEET

Untitled

thefoof Apr 7th, 2020 207 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PlayerMovement *__thiscall setPredictionUpdate(QuantizedPrediction *this, PlayerMovement *a2)
  2. {
  3.   // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
  4.  
  5.   result = a2;
  6.   a2->grid = this->grid;
  7.   _mm_storel_epi64((__m128i *)&a2->x, _mm_loadl_epi64((const __m128i *)&this->x));
  8.   a2->z = this->z;
  9.   a2->heading = (float)this->heading * 0.015625;
  10.   a2->pitch = (float)this->pitch * 0.015625;
  11.   a2->roll = (float)this->roll * 0.015625;
  12.   v3 = this->velocityY;
  13.   *(float *)&v9 = (float)this->velocityX * 0.03125;
  14.   v4 = (float)v3;
  15.   v5 = this->velocityZ;
  16.   *((float *)&v9 + 1) = v4 * 0.03125;
  17.   v10 = (float)v5 * 0.03125;
  18.   _mm_storel_epi64((__m128i *)&a2->velocityX, _mm_loadl_epi64((const __m128i *)&v9));
  19.   a2->velocityZ = (float)v5 * 0.03125;
  20.   v6 = this->unkVecY;
  21.   *(float *)&v9 = (float)this->unkVecX * 0.000061035156;
  22.   v7 = (float)v6;
  23.   v8 = this->unkVecZ;
  24.   *((float *)&v9 + 1) = v7 * 0.000061035156;
  25.   v10 = (float)v8 * 0.000061035156;
  26.   _mm_storel_epi64((__m128i *)&a2->unkVecX, _mm_loadl_epi64((const __m128i *)&v9));
  27.   a2->unkVecZ = (float)v8 * 0.000061035156;
  28.   a2->flags = this->flags;
  29.   a2->desiredRoll = this->desiredRoll;
  30.   a2->movementMode = this->movementMode;
  31.   a2->desiredHeading = (float)this->desiredHeading * 0.015625;
  32.   a2->desiredPitch = (float)this->desiredPitch * 0.015625;
  33.   a2->desiredHeadingVelocity = (float)this->desiredHeadingVelocity * 0.03125;
  34.   a2->posUnk52 = (float)this->unk52 * 0.03125;
  35.   a2->collisionRadius = (float)this->collisionRadius * 0.03125;
  36.   a2->collisionMultiplier = this->collisionMultiplier;
  37.   a2->posUnkFloat64 = this->unkFloat64;
  38.   a2->speedModifier = (float)this->speedModifier * 0.03125;
  39.   a2->swimmingSpeedModifier = (float)this->swimmingSpeedModifier * 0.03125;
  40.   a2->unkSpeed3 = (float)this->unkSpeed3 * 0.03125;
  41.   a2->desiredVertSpeed = (float)this->desiredVertSpeed * 0.03125;
  42.   a2->desiredStrafeSpeed = (float)this->desiredStrafeSpeed * 0.03125;
  43.   a2->flyingSpeedModifier = (float)this->flyingSpeedModifier * 0.03125;
  44.   a2->desiredForwardSpeed = (float)this->desiredForwardSpeed * 0.00390625;
  45.   a2->desiredRollVelocity = (float)this->desiredRollVelocity * 0.00390625;
  46.   a2->desiredPitchVelocity = (float)this->desiredPitchVelocity * 0.00390625;
  47.   a2->collisionScale = (float)this->collisionScale * 0.000061035156;
  48.   a2->posUnk70Float = (float)this->unk70 * 0.00390625;
  49.   a2->unkByte = this->unkByte;
  50.   _mm_storel_epi64((__m128i *)&a2->destLocX, _mm_loadl_epi64((const __m128i *)&this->destLocX));
  51.   a2->destLocZ = this->destLocZ;
  52.   _mm_storel_epi64((__m128i *)&a2->destLocX2, _mm_loadl_epi64((const __m128i *)&this->destLocX2));
  53.   a2->destLocZ2 = this->destLocZ2;
  54.   a2->faceActorID = this->faceActorID;
  55.   a2->actorStopRange = (float)this->actorStopRange * 0.03125;
  56.   return result;
  57. }
  58.  
  59. struct PlayerMovement {
  60.     /*0x00*/ unsigned int flags;
  61.     /*0x04*/ float desiredRoll;
  62.     /*0x08*/ float desiredHeading;
  63.     /*0x0c*/ float desiredPitch;
  64.     /*0x10*/ unsigned char unusedInPosPacket[0x14 - 0x10];
  65.     /*0x14*/ float desiredHeadingVelocity;
  66.     /*0x18*/ float posUnk52;
  67.     /*0x1c*/ float collisionRadius;
  68.     /*0x20*/ float collisionMultiplier;
  69.     /*0x24*/ float posUnkFloat64;
  70.     /*0x28*/ float speedModifier;
  71.     /*0x2c*/ float swimmingSpeedModifier;
  72.     /*0x30*/ float desiredStrafeSpeed;
  73.     /*0x34*/ float desiredVertSpeed;
  74.     /*0x38*/ float unkSpeed3;
  75.     /*0x3c*/ float flyingSpeedModifier;
  76.     /*0x40*/ float desiredForwardSpeed;
  77.     /*0x44*/ float desiredRollVelocity;
  78.     /*0x48*/ float desiredPitchVelocity; //unk
  79.     /*0x4c*/ float destLocX;
  80.     /*0x50*/ float destLocY;
  81.     /*0x54*/ float destLocZ;
  82.     /*0x58*/ float destLocX2;
  83.     /*0x5c*/ float destLocY2;
  84.     /*0x60*/ float destLocZ2;
  85.     /*0x64*/ float unkVecX;
  86.     /*0x68*/ float unkVecY;
  87.     /*0x6c*/ float unkVecZ;
  88.     /*0x70*/ unsigned int faceActorID;
  89.     /*0x74*/ float actorStopRange;
  90.     /*0x78*/ float collisionScale;
  91.     /*0x7c*/ float posUnk70Float;
  92.     /*0x80*/ unsigned char movementMode;
  93.     /*0x81*/ unsigned char unkByte;
  94.     /*0x82*/ unsigned char zz_align82[2];
  95.     /*0x84*/ unsigned int grid;
  96.     /*0x88*/ float x;
  97.     /*0x8c*/ float y;
  98.     /*0x90*/ float z;
  99.     /*0x94*/ float heading;
  100.     /*0x98*/ float pitch;
  101.     /*0x9c*/ float roll;
  102.     /*0xa0*/ float velocityX;
  103.     /*0xa4*/ float velocityY;
  104.     /*0xa8*/ float velocityZ;
  105.     /*0xac*/
  106. };
  107.  
  108. struct QuantizedPrediction {
  109.     /*0x00*/ unsigned int grid;
  110.     /*0x04*/ float x;
  111.     /*0x08*/ float y;
  112.     /*0x0c*/ float z;
  113.     /*0x10*/ unsigned short velocityX;
  114.     /*0x12*/ unsigned short velocityY;
  115.     /*0x14*/ unsigned short velocityZ;
  116.     /*0x16*/ unsigned short heading;
  117.     /*0x18*/ unsigned short desiredHeading;
  118.     /*0x1a*/ unsigned short desiredForwardSpeed;
  119.     /*0x1c*/ unsigned int flags;
  120.     /*0x20*/ float desiredRoll; //guess
  121.     /*0x24*/ float destLocX;
  122.     /*0x28*/ float destLocY;
  123.     /*0x2c*/ float destLocZ;
  124.     /*0x30*/ float destLocX2;
  125.     /*0x34*/ float destLocY2;
  126.     /*0x38*/ float destLocZ2;
  127.     /*0x3c*/ unsigned char movementMode;
  128.     /*0x3d*/ unsigned char unkByte;
  129.     /*0x3e*/ unsigned short desiredHeadingVelocity;//guessing most of these, all shorts
  130.     /*0x40*/ unsigned short speedModifier;
  131.     /*0x42*/ unsigned short swimmingSpeedModifier;
  132.     /*0x44*/ unsigned short flyingSpeedModifier;
  133.     /*0x46*/ unsigned short desiredStrafeSpeed;
  134.     /*0x48*/ unsigned short desiredVertSpeed;
  135.     /*0x4a*/ unsigned short unkSpeed3;
  136.     /*0x4c*/ unsigned short desiredRollVelocity;
  137.     /*0x4e*/ unsigned short desiredPitchVelocity;
  138.     /*0x50*/ unsigned short desiredPitch;
  139.     /*0x52*/ unsigned short unk52;
  140.     /*0x54*/ unsigned short unkVecX;
  141.     /*0x56*/ unsigned short unkVecY;
  142.     /*0x58*/ unsigned short unkVecZ;
  143.     /*0x5a*/ unsigned short pitch;
  144.     /*0x5c*/ unsigned short collisionRadius;
  145.     /*0x5e*/ unsigned short collisionScale;
  146.     /*0x60*/ float collisionMultiplier;
  147.     /*0x64*/ float unkFloat64;
  148.     /*0x68*/ unsigned int faceActorID;
  149.     /*0x6c*/ unsigned short actorStopRange;
  150.     /*0x6e*/ unsigned short roll;
  151.     /*0x70*/ unsigned short unk70;
  152.     /*0x72*/ unsigned short unk72;
  153.     /*0x74*/
  154. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top