Advertisement
dcomicboy

weap fix

Dec 8th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. void cHacks::AimCorrection( bool Correct )
  2. {
  3. if( !StoreWepData )
  4. {
  5. cWeaponMgr* WepMgr = *(cWeaponMgr**)ADDR_WEAPONMGR;
  6.  
  7. if( WepMgr )
  8. {
  9. for( int i = 0; i < WepMgr->WeaponCount; i++ )
  10. {
  11. cWeaponInfo* Wep = WepMgr->Weapons[i];
  12.  
  13. if( Wep )
  14. {
  15. OgAwepData[0][i] = Wep->fDuckPerturb;
  16. OgAwepData[1][i] = Wep->fMoveDuckPerturb;
  17. OgAwepData[2][i] = Wep->fPerturbIncSpeed;
  18. OgAwepData[3][i] = Wep->fPerturbDecSpeed;
  19. OgAwepData[4][i] = Wep->fCameraSwayXFreq;
  20. OgAwepData[5][i] = Wep->fCameraSwayYFreq;
  21. OgAwepData[6][i] = Wep->fZoomedPerturbIncSpeed;
  22. OgAwepData[7][i] = Wep->fZoomedPerturbDecSpeed;
  23. OgAwepData[8][i] = Wep->fTripleShotMaxCamRecoilPitch;
  24. OgAwepData[9][i] = Wep->fTripleShotBaseCamRecoilPitch;
  25. OgAwepData[10][i] = Wep->fTripleShotPerturbIncSpeed;
  26. OgAwepData[11][i] = Wep->fTripleShotPerturbDecSpeed;
  27. OgAwepData[12][i] = Wep->fBaseCamRecoilPitch;
  28. OgAwepData[13][i] = Wep->fBaseCamRecoilAccelPitch;
  29. OgAwepData[14][i] = Wep->dwTripleShotMinPerturb;
  30. OgAwepData[15][i] = Wep->dwTripleShotMaxPerturb;
  31. OgAwepData[16][i] = Wep->dwMaxPerturb;
  32. OgAwepData[17][i] = Wep->dwMinPerturb;
  33. OgAwepData[18][i] = Wep->dwZoomedMaxPerturb;
  34. OgAwepData[19][i] = Wep->dwZoomedMinPerturb;
  35. }
  36. }
  37. }
  38. StoreWepData = true;
  39. }
  40.  
  41. if( Correct )
  42. {
  43. // if( engine->GetPlayerMgr() && engine->GetPlayerMgr()->GetCurrentWeapon() )
  44. // engine->GetPlayerMgr()->GetCurrentWeapon()->spreadMultiplier = 0.f;
  45.  
  46. if( SetWepData )
  47. {
  48. cWeaponMgr* WepMgr = *(cWeaponMgr**)ADDR_WEAPONMGR;
  49.  
  50. if( WepMgr )
  51. {
  52. for( int i = 0; i < WepMgr->WeaponCount; i++ )
  53. {
  54. cWeaponInfo* Wep = WepMgr->Weapons[i];
  55.  
  56. if( Wep )
  57. {
  58. Wep->fDuckPerturb = 0.0f;
  59. Wep->fMoveDuckPerturb = 0.0f;
  60. Wep->fPerturbIncSpeed = 0.0f;
  61. Wep->fPerturbDecSpeed = 0.0f;
  62. Wep->fCameraSwayXFreq = 0.0f;
  63. Wep->fCameraSwayYFreq = 0.0f;
  64. Wep->fZoomedPerturbIncSpeed = 0.0f;
  65. Wep->fZoomedPerturbDecSpeed = 0.0f;
  66. Wep->fTripleShotMaxCamRecoilPitch = 0.0f;
  67. Wep->fTripleShotBaseCamRecoilPitch = 0.0f;
  68. Wep->fTripleShotPerturbIncSpeed = 0.0f;
  69. Wep->fTripleShotPerturbDecSpeed = 0.0f;
  70. Wep->fBaseCamRecoilPitch = 0.0f;
  71. Wep->fBaseCamRecoilAccelPitch = 0.0f;
  72. Wep->dwTripleShotMinPerturb = 0.0f;
  73. Wep->dwTripleShotMaxPerturb = 0.0f;
  74. Wep->dwMaxPerturb = 0.0f;
  75. Wep->dwMinPerturb = 0.0f;
  76. Wep->dwZoomedMaxPerturb = 0.0f;
  77. Wep->dwZoomedMinPerturb = 0.0f;
  78. }
  79. }
  80. }
  81. SetWepData = false;
  82. }
  83. }
  84. else
  85. {
  86. if( !SetWepData )
  87. {
  88. cWeaponMgr* WepMgr = *(cWeaponMgr**)ADDR_WEAPONMGR;
  89.  
  90. if( WepMgr )
  91. {
  92. for( int i = 0; i < WepMgr->WeaponCount; i++ )
  93. {
  94. cWeaponInfo* Wep = WepMgr->Weapons[i];
  95.  
  96. if( Wep )
  97. {
  98. Wep->fDuckPerturb = OgAwepData[0][i];
  99. Wep->fMoveDuckPerturb = OgAwepData[1][i];
  100. Wep->fPerturbIncSpeed = OgAwepData[2][i];
  101. Wep->fPerturbDecSpeed = OgAwepData[3][i];
  102. Wep->fCameraSwayXFreq = OgAwepData[4][i];
  103. Wep->fCameraSwayYFreq = OgAwepData[5][i];
  104. Wep->fZoomedPerturbIncSpeed = OgAwepData[6][i];
  105. Wep->fZoomedPerturbDecSpeed = OgAwepData[7][i];
  106. Wep->fTripleShotMaxCamRecoilPitch = OgAwepData[8][i];
  107. Wep->fTripleShotBaseCamRecoilPitch = OgAwepData[9][i];
  108. Wep->fTripleShotPerturbIncSpeed = OgAwepData[10][i];
  109. Wep->fTripleShotPerturbDecSpeed = OgAwepData[11][i];
  110. Wep->fBaseCamRecoilPitch = OgAwepData[12][i];
  111. Wep->fBaseCamRecoilAccelPitch = OgAwepData[13][i];
  112. Wep->dwTripleShotMinPerturb = OgAwepData[14][i];
  113. Wep->dwTripleShotMaxPerturb = OgAwepData[15][i];
  114. Wep->dwMaxPerturb = OgAwepData[16][i];
  115. Wep->dwMinPerturb = OgAwepData[17][i];
  116. Wep->dwZoomedMaxPerturb = OgAwepData[18][i];
  117. Wep->dwZoomedMinPerturb = OgAwepData[19][i];
  118. }
  119. }
  120. }
  121. SetWepData = true;
  122. }
  123. }
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement