Guest User

Untitled

a guest
Oct 9th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.67 KB | None | 0 0
  1. #ifndef BF4MANAGER_H
  2. #define BF4MANAGER_H
  3.  
  4. #include <windows.h>
  5. #include "D3D11.h"
  6. #include "D3DX10math.h"
  7.  
  8. #define OFFSET_DBRENDERER 0x1401EDC90
  9. #define OFFSET_DRAWTEXT 0x1401EFF80
  10. #define OFFSET_DRAWLINE 0x1401EFB30
  11. #define OFFSET_DRAWLINERECT 0x1401EFBA0
  12. #define OFFSET_DRAWFILLRECT 0x1405dc7e0
  13. #define OFFSET_DXRENDERER 0x142DDF748
  14. #define OFFSET_GAMECONTEXT 0x142C8F540
  15. #define OFFSET_GAMERENDERER 0x142DDF8C8
  16. #define OFFSET_VIEWANGLES 0x1421d8360
  17. #define OFFSET_MAIN 0x1429C4140
  18. #define OFFSET_WORLDRENDERSETTINGS 0x14240bd38
  19. #define OFFSET_BORDERINPUTNODE 0x142496cb8
  20. #define OFFSET_ANTVTABLE 0x141b5e1a0
  21. #define OFFSET_SSMODULE 0x142E96C58
  22. #define OFFSET_CURRENT_WEAPONFIRING 0x1421d8378;
  23.  
  24. class BoneCollisionComponent;
  25. class BorderInputNode;
  26. class Client;
  27. class ClientAnimatedSoldierWeaponHandler;
  28. class ClientAntAnimatableComponent;
  29. class ClientCharacterEntity;
  30. class ClientControllableEntity;
  31. class ClientPlayer;
  32. class ClientSoldierPrediction;
  33. class ClientRagDollComponent;
  34. class ClientSoldierEntity;
  35. class ClientVehicleEntity;
  36. class ClientWeapon;
  37. class DxRenderer;
  38. class DebugRenderer;
  39. class GameRenderer;
  40. class GameTime;
  41. class GameWorld;
  42. class HavokPhysicsManager;
  43. class IPhysicsRayCaster;
  44. class Main;
  45. class ProjectileData;
  46. class RayCastHit;
  47. class Screen;
  48. class SoldierEntity;
  49. class ShotConfigData;
  50. class UpdatePoseResultData;
  51. class WeaponModifier;
  52. class WeaponSway;
  53. class WorldRenderSettings;
  54. class ViewAngles;
  55.  
  56. class WeaponSway
  57. {
  58. public:
  59. char pad_0x0000[304];
  60. float m_deviationPitch; //0x0130
  61. float m_deviationYaw; //0x0134
  62. float m_deviationRoll; //0x0138
  63. float m_deviationTransY; //0x013C
  64. float m_timeSinceLastShot; //0x0140
  65. DWORD m_cameraRecoilDeviation; //0x0144
  66. D3DXMATRIX m_cameraRecoilTransform; //0x0148
  67. char pad_0x0188[24];
  68. float m_dispersionAngle; //0x01A0
  69. float m_minDispersionAngle; //0x01A4
  70. float m_crossHairDispersionFactor; //0x01A8
  71. float m_currentDispersionPitch; //0x01AC
  72. float m_currentDispersionYaw; //0x01B0
  73. float m_currentDispersionRoll; //0x01B4
  74. float m_currentDispersionTransY; //0x01B8
  75. }; // Size 0x0438
  76.  
  77.  
  78. class ProjectileData
  79. {
  80. public:
  81. char _0x0000[304];
  82. float m_gravity; //0x0130
  83. float m_impactImpulse; //0x0134
  84. float m_detonationTimeVariation; //0x0138
  85. float m_vehicleDetonationRadius; //0x013C
  86. float m_vehicleDrtonationActivationDelay; //0x0140
  87. float m_flyBySoundRadius; //0x0144
  88. float m_flyBySoundSpeed; //0x0148
  89. float m_firstFraneTravelDistance; //0x014C
  90. float m_distributeDamageOverTime; //0x0150
  91. float m_DamageMaX; //0x0154
  92. float m_DamageMin; //0x0158
  93. float m_DamageFallOff; //0x015C
  94. float m_DamageFallOffEndDistance; //0x0160
  95. float m_TimeToArmExplosion; //0x0164
  96. char pad_0x0168[4];
  97. BYTE m_bHasVehicleDetination; //0x016C
  98. BYTE m_bInstantHit; //0x016D
  99. BYTE m_bStopTrail; //0x016E
  100. BYTE m_bUnk; //0x016F
  101. };
  102.  
  103. class ShotConfigData
  104. {
  105. public:
  106. char pad_0x0000[136];
  107. float m_initialSpeed; //0x0088
  108. char pad_0x008C[20];
  109. float m_inheritWeaponSpeedAmount; //0x00A0
  110. char pad_0x00A4[12];
  111. ProjectileData* m_pProjectileData; //0x00B0
  112. ProjectileData* m_pSecondaryProjectileData; //0x00B8
  113. __int64 m_projectile; //0x00C0
  114. __int64 m_secondaryProjectile; //0x00C8
  115. float m_spawnDelay; //0x00D0
  116. DWORD m_numberOfBulletsPerShell; //0x00D4
  117. DWORD m_numberOfBulletsPerShot; //0x00D8
  118. DWORD m_numberOfBulletsPerBurst; //0x00DC
  119. BYTE m_relativeTargetAiming; //0x00E0
  120. BYTE m_forceSpawnToCamera; //0x00E1
  121. BYTE m_spawnVisualAtWeaponBone; //0x00E2
  122. BYTE m_activeForceSpawnToCamera; //0x00E3
  123. };
  124.  
  125. class PrimaryFire
  126. {
  127. public:
  128. BYTE pad00[0x10]; // 0x0000
  129. ShotConfigData* m_shotConfigData; // 0x0010
  130. };
  131.  
  132. class WeaponFiring
  133. {
  134. public:
  135. char pad_0x0000[120];
  136. WeaponSway* m_pSway; //0x0078
  137. char pad_0x0080[168];
  138. PrimaryFire* m_pPrimaryFire; //0x0128
  139. char pad_0x0130[24];
  140. DWORD m_weaponState; //0x0148
  141. DWORD m_lastWeaponState; //0x014C
  142. DWORD m_nextWeaponState; //0x0150
  143. char pad_0x0154[8];
  144. float m_timeToWait; //0x015C
  145. float m_reloadTimer; //0x0160
  146. float m_holdReleaseMinDelay; //0x0164
  147. float m_recoilTimer; //0x0168
  148. float m_recoilAngleX; //0x016C
  149. float m_recoilAngleY; //0x0170
  150. float m_recoilAngleZ; //0x0174
  151. float m_recoilFovAngle; //0x0178
  152. float m_recoilTimeMultiplier; //0x017C
  153. float m_overheatDropMultiplier; //0x0180
  154. __int32 m_primaryAmmoToFill; //0x0184
  155. __int32 m_reloadStage; //0x0188
  156. DWORD_PTR m_pCharacterMeleeEntity; //0x018C
  157. __int32 m_externalPrimaryMagazineCapacity; //0x0194
  158. char pad_0x0198[8];
  159. __int32 m_projectilesLoaded; //0x01A0
  160. __int32 m_projectilesInMagazines; //0x01A4
  161. __int32 m_numberOfProjectilesToFire; //0x01A8
  162. BYTE m_hasStoppedFiring; //0x01AC
  163. BYTE m_primaryFireTriggeredLastFrame; //0x01AD
  164. BYTE m_isOverheated; //0x01AE
  165. BYTE m_unknown; //0x01AF
  166. char pad_0x01B0[8];
  167. DWORD m_tickCounter; //0x01B8
  168. __int32 m_fireMode; //0x01BC
  169. char pad_0x01C0[8];
  170. DWORD_PTR m_pFiringHolderData; //0x01C8
  171. };
  172.  
  173. class WeaponModifier
  174. {
  175. public:
  176. char pad_0x0000[64];
  177. BYTE m_breathControl; //0x0040
  178. BYTE m_supportedShooting; //0x0041
  179. BYTE m_unZoomOnBoltAction; //0x0042 Fixes unzoom When sniping
  180. BYTE m_holdBoltActionUntilZoomRelease; //0x0043
  181. };
  182.  
  183. class ClientWeapon
  184. {
  185. public:
  186.  
  187. class ControllableFinder
  188. {
  189. public:
  190.  
  191. class ControllableResult
  192. {
  193. public:
  194. char pad_0x0000[112];
  195. D3DXVECTOR3 m_Collision; //0x0070
  196. };
  197.  
  198. __int64 vtable; //0x0950
  199. char pad_0x0958[88];
  200. D3DXVECTOR4 m_lastRayBegin; //0x09B0
  201. D3DXVECTOR4 m_lastRayEnd; //0x09C0
  202. char pad_0x09CC[84];
  203. ControllableResult* m_pControllableResult; //0x0A28
  204. };
  205.  
  206. char pad_0x0000[24];
  207. PrimaryFire* m_pWeaponFiring;
  208. WeaponModifier* m_pModifier; //0x0020
  209. char pad_0x0028[8];
  210. D3DXVECTOR3 m_moveSpeed; //0x0030
  211. float m_moveSpeedPad; //0x003C
  212. D3DXMATRIX m_shootSpace; //0x0040
  213. D3DXMATRIX m_shootSpaceIdentity; //0x0080
  214. char pad_0x00C0[464];
  215. float m_cameraFov; //0x0290
  216. float m_weaponFov; //0x0294
  217. float m_fovScaleFactor; //0x0298
  218. char pad_0x029C[20];
  219. DWORD m_zoomLevel; //0x02B0
  220. char pad_0x02B4[1692];
  221. ControllableFinder m_controllableFinder; //0x0950
  222. };
  223.  
  224. class AimAssist
  225. {
  226. public:
  227. BYTE pad00[0x8]; //0x00
  228. BYTE pad01[0x8]; //0x08
  229. BYTE pad02[0x4]; //0x10
  230. float m_yaw; //0x14
  231. float m_pitch; //0x18
  232. };
  233.  
  234. class ClientSoldierAimingEnvironment
  235. {
  236. public:
  237. char _0x0000[8];
  238. ClientSoldierEntity* m_soldier; //0x0008
  239. };//Size=0x0010
  240.  
  241.  
  242. class ClientSoldierAimingSimulation
  243. {
  244. public:
  245. char _0x0000[48];
  246. AimAssist* m_fpsAimer; //0x0030
  247. float m_yaw; //0x0038
  248. float m_pitch; //0x003C
  249. float m_aimYawTimer; //0x0040
  250. float m_aimPitchTimer; //0x0044
  251. D3DXVECTOR2 m_sway; //0x0048
  252. float m_DeltaTime; //0x0050
  253. char _0x0054[52];
  254. };
  255.  
  256. class ClientSoldierWeapon
  257. {
  258. public:
  259. BYTE pad00[0x4988]; //0x0000
  260. ClientSoldierAimingSimulation* m_authorativeAiming; //0x4988
  261. BYTE pad01[0x8]; //0x4990
  262. BYTE pad02[0x8]; //0x4998
  263. BYTE pad03[0x8]; //0x49A0
  264. ClientWeapon* m_pWeapon; //0x49A8
  265. char pad_0x49B0[16]; //0x49B0
  266. WeaponFiring* m_pPrimary; //0x49C0
  267. };
  268.  
  269.  
  270. class ClientSoldierWeaponsComponent
  271. {
  272. public:
  273.  
  274. class ClientAnimatedSoldierWeaponHandler
  275. {
  276. public:
  277. ClientSoldierWeapon* m_WeaponList[7]; //0x0000
  278. };
  279.  
  280. enum WeaponSlot
  281. {
  282. M_PRIMARY = 0,
  283. M_SECONDARY = 1,
  284. M_GADGET = 2,
  285. M_GRENADE = 6,
  286. M_KNIFE = 7
  287. };
  288.  
  289. char pad_0x0000[208];
  290. D3DXMATRIX m_weaponTransform; //0x00D0
  291. char pad_0x0110[1680];
  292. ClientAnimatedSoldierWeaponHandler* m_handler; //0x07A0
  293. char pad_0x07A8[32];
  294. ClientAntAnimatableComponent* m_animatableComponent[2]; //0x07C8
  295. ClientSoldierEntity* m_soldier; //0x07D8
  296. char pad_0x07E0[456];
  297. WeaponSlot m_activeSlot; //0x09A8
  298. WeaponSlot m_lastActiveSlot; //0x09AC
  299. WeaponSlot m_lastActiveWeaponSlot; //0x09B0
  300. char pad_0x09B4[28];
  301. int m_currentZoomLevel; //0x09D0
  302. int m_zoomLevelMax; //0x09D4
  303. int m_zeroingDistanceLevel; //0x09D8
  304. BYTE m_noMagnifierAccessory; //0x09DC
  305. char pad_0x09DD[779];
  306. float m_timeSinceLastShot; //0x0CE8
  307.  
  308. ClientSoldierWeapon* GetActiveSoldierWeapon( )
  309. {
  310. if ( m_activeSlot == 0 || m_activeSlot == 1 )
  311. return m_handler->m_WeaponList[m_activeSlot];
  312. else
  313. return NULL;
  314. };
  315. };
  316.  
  317. class UpdatePoseResultData
  318. {
  319. public:
  320.  
  321. enum BONES
  322. {
  323. BONE_HEAD = 104,
  324. BONE_NECK = 142,
  325. BONE_SPINE2 = 7,
  326. BONE_SPINE1 = 6,
  327. BONE_SPINE = 5,
  328. BONE_LEFTSHOULDER = 9,
  329. BONE_RIGHTSHOULDER = 109,
  330. BONE_LEFTELBOWROLL = 11,
  331. BONE_RIGHTELBOWROLL = 111,
  332. BONE_LEFTHAND = 15,
  333. BONE_RIGHTHAND = 115,
  334. BONE_LEFTKNEEROLL = 188,
  335. BONE_RIGHTKNEEROLL = 197,
  336. BONE_LEFTFOOT = 184,
  337. BONE_RIGHTFOOT = 198
  338. };
  339.  
  340. class QuatTransform
  341. {
  342. public:
  343. D3DXVECTOR4 m_TransAndScale; // 0x0000
  344. D3DXVECTOR4 m_Rotation; // 0x0010
  345. }; // Size 0x0020
  346.  
  347. QuatTransform* m_LocalTransform; // 0x0000
  348. QuatTransform* m_WorldTransform; // 0x0008
  349. QuatTransform* DB00147A; // 0x0010
  350. QuatTransform* DB00147B; // 0x0018
  351. QuatTransform* DB00147D; // 0x0020
  352. QuatTransform* m_ActiveWorldTransforms; // 0x0028
  353. QuatTransform* m_ActiveLocalTransforms; // 0x0030
  354. __int32 m_Slot; // 0x0038
  355. __int32 m_ReaderIndex; // 0x003C
  356. BYTE m_ValidTransforms; // 0x0040
  357. BYTE m_PoseUpdateEnabled; // 0x0041
  358. BYTE m_PoseNeeded; // 0x0042
  359. BYTE pad44[0x01]; // 0x0044
  360. };
  361.  
  362. class ClientAntAnimatableComponent
  363. {
  364. public:
  365. BYTE pad00[0x4C0];
  366. };
  367.  
  368. class ClientRagDollComponent
  369. {
  370. public:
  371. char pad_0x0000[136];
  372. UpdatePoseResultData m_ragdollTransforms; //0x0088
  373. char pad_0x0090[1344];
  374. D3DXMATRIX m_Transform; //0x05D0
  375. };
  376.  
  377. class BoneCollisionComponent
  378. {
  379. public:
  380.  
  381. class BoneTransformInfo
  382. {
  383. public:
  384. D3DXMATRIX transform; // 0x00
  385. D3DXVECTOR4 position; // 0x40
  386. };
  387.  
  388. char pad_0x0000[80];
  389. __int64 m_skeleton; //0x0050
  390. BoneTransformInfo* m_boneCollisionTransforms; //0x0058
  391. };
  392.  
  393. class ClientControllableEntity
  394. {
  395. public:
  396.  
  397. class HealthComponent
  398. {
  399. public:
  400. char pad_0x0000[32];
  401. float m_health; //0x0020
  402. float m_maxhealth; //0x0024
  403. char pad_0x0028[16];
  404. float m_vehicleHealth; //0x0038
  405. };
  406.  
  407. virtual void Function0( ); //
  408. virtual void Function1( ); //
  409. virtual void Function2( ); //
  410. virtual void Function3( ); //
  411. virtual void Function4( ); //
  412. virtual void Function5( ); //
  413. virtual void Function6( ); //
  414. virtual void Function7( ); //
  415. virtual void Function8( ); //
  416. virtual void Function9( ); //
  417. virtual void Function10( ); //
  418. virtual void Function11( ); //
  419. virtual void Function12( ); //
  420. virtual void Function13( ); //
  421. virtual void Function14( ); //
  422. virtual void Function15( ); //
  423. virtual void Function16( ); //
  424. virtual void Function17( ); //
  425. virtual void Function18( ); //
  426. virtual void Function19( ); //
  427. virtual void Function20( ); //
  428. virtual void Function21( ); //
  429. virtual void Function22( ); //
  430. virtual void GetTransform( D3DXMATRIX* mTransform ); // ClientControllableEntity
  431.  
  432. char pad_0x0008[248];
  433. float m_velocity; //0x0100
  434. char pad_0x0104[60];
  435. HealthComponent* m_pHealthComponent; //0x0140
  436. char pad_0x0148[64];
  437. };
  438.  
  439. class ClientCharacterEntity : public ClientControllableEntity
  440. {
  441. public:
  442. char pad_0x0188[80]; //72 With vt?
  443. ClientPlayer* m_pPlayer; //0x01D8
  444. ClientAntAnimatableComponent* m_animatableComponent[2]; //0x01E0
  445. __int64 m_pCharacterCameraComponent; //0x01F0
  446. char pad_0x01F8[136];
  447. };
  448.  
  449. class SoldierEntity
  450. {
  451. public:
  452. char pad_0x0000[256];
  453. __int64 m_pBoneCollisionComponent; //0x0100
  454. float m_moveSpeedMultiplier; //0x0108
  455. float m_sprintSpeedMultiplier; //0x010C
  456. float m_jumpHeightMultiplier; //0x0110
  457. float m_lookSpeedMultiplier; //0x0114
  458. float m_waterLevel; //0x0118
  459. float m_waterSpeed; //0x011C
  460. char pad_0x0120[8];
  461. __int64 m_pCharacterEntity; //0x0128
  462. };
  463.  
  464. class ClientSoldierPrediction
  465. {
  466. public:
  467. char _0x0000[32];
  468. D3DXQUATERNION m_ParachuteRotation; //0x0020
  469. D3DXVECTOR3 m_Position; //0x0030
  470. char _0x003C[20];
  471. D3DXVECTOR3 m_Velocity; //0x0050
  472. char _0x005C[32];
  473. BYTE m_Pose; //0x007C
  474. char _0x007D[3];
  475. BYTE m_ChangingToPose; //0x0080
  476. char _0x0081[23];
  477. __int32 Event; //0x0098 make an enum
  478. __int32 PlayerState; //0x009C make an enum
  479. };//Size=0x00A0
  480.  
  481. class AxisAlignedBox
  482. {
  483. public:
  484. __declspec( align( 16 ) )D3DXVECTOR3 min;
  485. __declspec( align( 16 ) )D3DXVECTOR3 max;
  486. };
  487.  
  488. class ClientSoldierEntity : public ClientCharacterEntity, // +0x000
  489. public SoldierEntity // +0x280
  490. {
  491. public:
  492.  
  493. class BreathControlHandler
  494. {
  495. public:
  496. char pad_0x0000[56];
  497. float m_breathControlTimer; //0x0038
  498. float m_breathControlMultiplier; //0x003C
  499. float m_breathControlPenaltyTimer; //0x0040
  500. float m_breathControlPenaltyMultiplier; //0x0044
  501. float m_breathControlActive; //0x0048
  502. float m_breathControlInput; //0x004C
  503. float m_breathActive; //0x0050
  504. char _0x0054[4];
  505. float IDONTKNOW; //0x0058
  506. };
  507.  
  508. class SprintInputHandler
  509. {
  510. public:
  511. __int32 m_currentState; //0x0000
  512. float m_doubleTapTimer; //0x0004
  513. float m_sprintReleaseTimer; //0x0008
  514. __int32 m_waitForSprintRelease; //0x000C
  515. };
  516.  
  517. char pad_0x03B0[216];
  518. __int64 m_pVehicleEntry; //0x0488
  519. ClientSoldierPrediction* m_pPredictedController; //0x0490
  520. char pad_0x0498[64];
  521. float m_authorativeYaw; //0x04D8
  522. float m_authorativePitch; //0x04DC
  523. __int32 m_aimingEnabled; //0x04E0
  524. float m_cachedPitch; //0x04E4
  525. __int64 m_soldierSound; //0x04E8
  526. __int32 m_poseType; //0x04F0
  527. char pad_0x04F4[92];
  528. ClientSoldierWeaponsComponent* m_soldierWeaponsComponent; //0x0550
  529. __int64 m_bodyComponent; //0x0558
  530. ClientRagDollComponent* m_ragdollComponent; //0x0560
  531. BreathControlHandler* m_breathControlHandler; //0x0568
  532. char pad_0x0570[16];
  533. SprintInputHandler* m_sprintInputHandler; //0x0580
  534. __int32 padThis; //0x0588
  535. float m_timeSinceLastSprinted; //0x058C
  536. BYTE m_sprinting; //0x0590
  537. BYTE m_occluded; //0x0591
  538. char pad_0x0592[286];
  539. __int64 m_pClientCharacterEntity; //0x06B0
  540. char pad_0x06B8[416];
  541.  
  542. bool Visible( )
  543. {
  544. return !m_occluded;
  545. }
  546.  
  547. ClientSoldierWeapon* GetActiveWeapon( )
  548. {
  549. if ( !m_soldierWeaponsComponent )
  550. return NULL;
  551.  
  552. if ( ( DWORD_PTR )m_soldierWeaponsComponent > 0xFFFFFFFF )
  553. return NULL;
  554.  
  555. if ( IsBadReadPtr( m_soldierWeaponsComponent, 8 ) )
  556. return NULL;
  557.  
  558. return m_soldierWeaponsComponent->GetActiveSoldierWeapon( );
  559. }
  560. };
  561.  
  562. class ClientVehicleEntity : public ClientControllableEntity
  563. {
  564. public:
  565. virtual void Function0( ); //
  566. virtual void Function1( ); //
  567. virtual void Function2( ); //
  568. virtual void Function3( ); //
  569. virtual void Function4( ); //
  570. virtual void Function5( ); //
  571. virtual void Function6( ); //
  572. virtual void Function7( ); //
  573. virtual void Function8( ); //
  574. virtual void Function9( ); //
  575. virtual void Function10( ); //
  576. virtual void Function11( ); //
  577. virtual void Function12( ); //
  578. virtual void Function13( ); //
  579. virtual void Function14( ); //
  580. virtual void Function15( ); //
  581. virtual void Function16( ); //
  582. virtual void Function17( ); //
  583. virtual void Function18( ); //
  584. virtual void Function19( ); //
  585. virtual void Function20( ); //
  586. virtual void Function21( ); //
  587. virtual void Function22( ); //
  588. virtual void GetTransform( D3DXMATRIX* mTransform );
  589.  
  590. char pad_0x0188[176];
  591. float m_waterLevel; //0x0240
  592. float m_terrainLevel; //0x0244
  593. float m_waterLevelUpdateTimer; //0x0248
  594. float m_terrainLevelUpdateTimer; //0x024C
  595. AxisAlignedBox m_childrenAabb;
  596. char pad_0x0250[28];
  597. D3DXVECTOR3 m_vehicleSpeed; //0x0280
  598. };
  599.  
  600. class ClientPlayer
  601. {
  602. public:
  603. char pad_0x0000[0x40]; //0x0000
  604. char Name[32]; //0x0040
  605. char pad_0x0060[0x1358]; //0x0060
  606. __int32 N000003B1; //0x13B8
  607. __int32 m_teamid; //0x13BC
  608. char pad_0x13C0[0xE0]; //0x13C0
  609. ClientSoldierEntity* m_pCorpse; //0x14A0
  610. ClientSoldierEntity* m_pSoldier; //0x14A8
  611. ClientSoldierEntity* m_pCharacter; //0x14B0
  612. ClientSoldierEntity* m_pAttachedControllable; //0x14B8
  613. __int32 m_iAttachedEntryId; //0x14C0
  614. __int32 m_iControlledEntryId; //0x14C4
  615. ClientSoldierEntity* m_pControlledControllable; //0x14C8
  616. char pad_0x14D0[0x3D8]; //0x14D0
  617.  
  618. ClientSoldierEntity* GetClientSoldier()
  619. {
  620. if (m_pControlledControllable)
  621. return m_pControlledControllable;
  622.  
  623. return NULL;
  624. }
  625.  
  626. };//Size=0x14D0
  627.  
  628. template <class T>
  629. class vector // Size = 32b = 0x20 //x64 ONLY
  630. {
  631. private:
  632. T* m_firstElement;
  633. T* m_lastElement;
  634. T* m_arrayBound;
  635. LPVOID vftable;
  636. public:
  637. int Size() { return (((DWORD64)m_lastElement - (DWORD64)m_firstElement) / 8); }
  638. T At(int nIndex) { return *(T*)((DWORD64)m_firstElement + (nIndex * sizeof(T))); }
  639. T operator [](int index) { return At(index); }
  640. };
  641.  
  642. class ClientPlayerManager
  643. {
  644. public:
  645. char _0x0000[16];
  646. __int32 iMaxPlayerCount; //0x0010 NotSure
  647. __int32 iUnk; //0x0014
  648. __int32 iUnk2; //0x0018
  649. char _0x001C[1332];
  650. ClientPlayer* pLocalPlayer; //0x0550
  651. char _0x0558[504];
  652. ClientPlayer** pPlayerList; //0x0750
  653. char _0x0758[1232];
  654.  
  655. ClientPlayer* GetPlayerByID(unsigned int ID)
  656. {
  657. if (ID < 40)
  658. {
  659. ClientPlayer* tmp = *(ClientPlayer**)((DWORD_PTR)pPlayerList + (ID * 0x8));
  660. if (tmp)
  661. return (ClientPlayer*)tmp;
  662. }
  663.  
  664. return nullptr;
  665. }
  666.  
  667. };//Size=0x0C28
  668.  
  669. class RayCastHit
  670. {
  671. public:
  672. D3DXVECTOR4 m_position; //0x0000
  673. D3DXVECTOR4 m_normal; //0x0010
  674. char pad_0x0020[80];
  675. };
  676.  
  677. class IPhysicsRayCaster
  678. {
  679. public:
  680.  
  681. enum RayCastFlags
  682. {
  683. NoCheck = 0,
  684. CheckDetailMesh = 0x0DB,
  685. IsAsyncRaycast = 0x2,
  686. DontCheckWater = 0x0FD,
  687. DontCheckTerrain = 0x07A,
  688. DontCheckRagdoll = 0x10,
  689. DontCheckCharacter = 0x20,
  690. DontCheckGroup = 0x40,
  691. DontCheckPhantoms = 0x80,
  692. };
  693.  
  694. virtual bool PhysicsRayQuery( const char* identifier, D3DXVECTOR4* from, D3DXVECTOR4* to, RayCastHit* hit, int flag, void* PhysicsEntityList );
  695. };
  696.  
  697. class GameWorld
  698. {
  699. public:
  700. BYTE pad00[0x58]; // 0x00
  701. IPhysicsRayCaster* m_RayCaster; // 0x0058
  702. };
  703.  
  704. class WorldRenderSettings
  705. {
  706. public:
  707. char pad_0x0000[120];
  708. float m_motionBlurScale; //0x0078
  709. float m_motionBlurMax; //0x007C
  710. float m_motionBlurNoiseScale; //0x0080
  711. DWORD m_motionBlurQuality; //0x0084
  712. DWORD m_dynamicEnvmapResolution; //0x0088
  713. DWORD m_maxDecalVolumeCount; //0x008C
  714. DWORD m_motionBlurMaxSampleCount; //0x0090
  715. DWORD m_motionBlurFrameAverageCount; //0x0094
  716. float m_motionBlurMaxFrameTime; //0x0098
  717. float m_forceMotionBlurDepthCutoff; //0x009C
  718. float m_forceMotionBlurCutoffGradientScale; //0x00A0
  719. DWORD m_multisampleCount; //0x00A4
  720. float m_multisampleThreshold; //0x00A8
  721. DWORD m_maxSpotLightShadowCount; //0x00AC
  722. DWORD m_reflectionEnvmapSize; //0x00B0
  723. float m_spotLightNearPlane; //0x00B4
  724. float m_subSurfaceRolloff; //0x00B8
  725. DWORD m_unk0; //0x00BC
  726. DWORD m_maxSpotLightCount; //0x00C0
  727. DWORD m_spotLightShadowmapResolution; //0x00C4
  728. DWORD m_spotLightShadowmapQuality; //0x00C8
  729. char pad_0x00CC[105];
  730. BYTE m_drawSky; //0x0135
  731. BYTE m_drawSunRays; //0x0136
  732. BYTE m_drawFog; //0x0137
  733. BYTE m_drawSunBlur; //0x0138
  734. char pad_0x0139[285];
  735. BYTE m_drawSunRays2; //0x0256
  736.  
  737. static WorldRenderSettings* GetInstance( )
  738. {
  739. return *( WorldRenderSettings** )OFFSET_WORLDRENDERSETTINGS;
  740. }
  741. };
  742.  
  743. class HavokPhysicsManager
  744. {
  745. public:
  746. BYTE pad00[0x120]; // 0x00
  747. GameWorld* m_GameWorld; // 0x120
  748. };
  749.  
  750. class ClientGameContext
  751. {
  752. public:
  753. BYTE pad00[0x20]; // 0x00
  754. DWORD_PTR m_GameTime; // 0x20
  755. HavokPhysicsManager* m_pPhysicsManager; // 0x28
  756. BYTE pad30[0x30]; // 0x30
  757. ClientPlayerManager* m_pPlayerManager; // 0x60
  758.  
  759. static ClientGameContext* GetInstance( )
  760. {
  761. return *( ClientGameContext** )( OFFSET_GAMECONTEXT );
  762. }
  763. };
  764.  
  765. class GameTime
  766. {
  767. public:
  768. DWORD m_ticks; //0x0000
  769. DWORD m_tickFrequency; //0x0004
  770. DWORD m_tickIndexInFrame; //0x0008
  771. DWORD m_lastTickIndexInFrame; //0x000C
  772. DWORD m_tickCountInFrame; //0x0010
  773. float m_deltaTime; //0x0014
  774. float m_passedDeltaTimeInFrame; //0x0018
  775.  
  776. };
  777.  
  778. class Client
  779. {
  780. public:
  781. char pad_0x0000[40];
  782. ClientGameContext* m_pGameContext; //0x0028
  783. __int64 m_pSettings; //0x0030
  784. char pad_0x0038[8];
  785. ClientPlayerManager* m_pClientPlayerManager; //0x0040
  786. char pad_0x0048[24];
  787. GameTime* m_pGameTime; //0x0060
  788. BorderInputNode* m_pBorderInputNode; //0x0068
  789. };
  790.  
  791. class Main
  792. {
  793. public:
  794. char pad_0x0000[32];
  795. BYTE m_isDedicatedServer; //0x0020
  796. BYTE m_isDedicatedServerData; //0x0021
  797. BYTE m_isPaused; //0x0022
  798. char pad_0x0024[45];
  799. Client* m_pClient; //0x0050
  800.  
  801. static Main* GetInstance( )
  802. {
  803. return *( Main** )( OFFSET_MAIN );
  804. }
  805. };
  806.  
  807. class RenderView
  808. {
  809. public:
  810. char pad1[0x40];
  811. //D3DXMATRIX m_Transform; //0x0040
  812. D3DXVECTOR3 vLeft;
  813. float f01;
  814. D3DXVECTOR3 vUp;
  815. float f02;
  816. D3DXVECTOR3 vForward;
  817. float f03;
  818. D3DXVECTOR3 vOrigin;
  819. float f04;
  820. char pad2[0x34];
  821. float m_FovY; //0x00B4
  822. char pad3[0xC];
  823. float m_Aspect; //0x00C4
  824. char padss[0x358];
  825. D3DXMATRIX m_ViewProj; //0x460
  826. };
  827.  
  828. class GameRenderer
  829. {
  830. public:
  831. BYTE pad00[0x58]; // 0x00
  832. RenderView* m_pRenderView; // 0x58
  833.  
  834. static GameRenderer* GetInstance( )
  835. {
  836. return *( GameRenderer** )( OFFSET_GAMERENDERER );
  837. }
  838. };
  839. class RenderScreenInfo
  840. {
  841. public:
  842. __int32 m_Width; //0x0000
  843. __int32 m_Height; //0x0004
  844. __int32 m_WindowWidth; //0x0008
  845. __int32 m_WindowHeight; //0x000C
  846. float m_RefreshRate; //0x0010
  847. char _0x0014[4];
  848. };
  849.  
  850. class Screen
  851. {
  852. public:
  853. char _0x0000[8];
  854. uintptr_t m_WindowHandle; //0x0008
  855. char _0x0010[76];
  856. BYTE m_TopWindow; //0x005C
  857. BYTE m_Minimized; //0x005D
  858. BYTE m_Maximized; //0x005E
  859. BYTE m_Resizing; //0x005F
  860. char _0x0060[8];
  861. RenderScreenInfo m_ScreenInfo; //0x0068
  862. char _0x0080[504];
  863. IDXGISwapChain* m_pSwapChain; //0x0278
  864. char _0x0280[32];
  865. uintptr_t m_pDefaultRenderView; //0x02A0
  866. };
  867.  
  868. class DxRenderer
  869. {
  870. public:
  871. virtual void Function0();
  872.  
  873. char _0x0008[1992];
  874. __int32 m_FrameCounter1; //0x07D0
  875. __int32 m_FrameCounter2; //0x07D4
  876. BYTE m_FrameInProgress; //0x07D8
  877. char _0x07D9[7];
  878. Screen* m_pScreen; //0x07E0
  879. char _0x07E8[56];
  880. uintptr_t m_pDisplaySettings; //0x0820 fb::Dx11DisplaySettings
  881. char _0x0828[48];
  882. ID3D11Device* m_pDevice; //0x0858
  883. ID3D11DeviceContext* m_pContext; //0x0860
  884. char _0x0868[120];
  885. char* m_pAdapterName; //0x08E0
  886.  
  887. public:
  888. static DxRenderer* GetInstance()
  889. {
  890. return *reinterpret_cast<DxRenderer**>(0x142DE1EE8);
  891. }
  892. };
  893.  
  894. class BorderInputNode
  895. {
  896. public:
  897. virtual void Function0();
  898. virtual void Function1();
  899.  
  900. void* m_pInputCache; //0x0008
  901. char _0x0010[0x38];
  902. void* m_pInputNode; //0x0048
  903.  
  904. static BorderInputNode* GetInstance()
  905. {
  906. return (BorderInputNode*)(*((*(void***)0x1429412C0) + 1));
  907. }
  908. };
  909. class ViewAngles
  910. {
  911. public:
  912. BYTE pad00[0x14]; // 0x00
  913. float yaw; // 0x14
  914. float pitch; // 0x18
  915.  
  916. static ViewAngles* GetInstance( )
  917. {
  918. return *( ViewAngles** )(*( DWORD_PTR* )(*( DWORD_PTR* )( OFFSET_VIEWANGLES ) + 0x4988) + 0x10);
  919. }
  920. };
  921.  
  922. #endif
  923.  
  924. namespace fb
  925. {
  926. template <class T>
  927.  
  928. class Tuple2
  929. {
  930. public:
  931. T Element1;
  932. T Element2;
  933.  
  934. public:
  935. Tuple2(T _Element1, T _Element2)
  936. {
  937. Element1=_Element1;
  938. Element2=_Element2;
  939. }
  940. };
  941.  
  942. class Color32
  943. {
  944. public:
  945. union
  946. {
  947. struct
  948. {
  949. BYTE R;
  950. BYTE G;
  951. BYTE B;
  952. BYTE A;
  953. };
  954. DWORD dwColor;
  955. };
  956.  
  957. public:
  958. Color32(const DWORD _Color)
  959. {
  960. dwColor=_Color;
  961. }
  962.  
  963. Color32(const BYTE Red,const BYTE Green,const BYTE Blue, const BYTE Alpha)
  964. {
  965. A=Alpha;
  966. R=Red;
  967. G=Green;
  968. B=Blue;
  969. }
  970. };
  971.  
  972. class DebugRenderer2
  973. {
  974. public:
  975. static DebugRenderer2* Singleton(void) //Credits to KingOrgy for giving me some hints
  976. {
  977. typedef fb::DebugRenderer2* (__stdcall* fb__DebugRenderManager_getThreadContext_t)(void);
  978. fb__DebugRenderManager_getThreadContext_t fb__DebugRenderManager_getThreadContext=(fb__DebugRenderManager_getThreadContext_t)OFFSET_DBRENDERER;
  979. return fb__DebugRenderManager_getThreadContext();
  980. }
  981.  
  982. void drawText(int x, int y, Color32 color, char* text, float scale)
  983. {
  984. typedef void (__thiscall *tdrawText)(fb::DebugRenderer2*,int, int, char*, Color32,float);
  985. tdrawText mdrawText=(tdrawText)OFFSET_DRAWTEXT;
  986. mdrawText(this,x,y,text,color,scale);
  987. }
  988.  
  989. void drawLine2d(float x1, float y1, float x2, float y2, Color32 color)
  990. {
  991. Tuple2< float > minpos = Tuple2< float >(x1, y1);
  992. Tuple2< float > maxpos = Tuple2< float >(x2, y2);
  993. typedef void (__thiscall *tdrawLine2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
  994. tdrawLine2d mdrawLine2d=(tdrawLine2d)OFFSET_DRAWLINE;
  995. mdrawLine2d(this,&minpos,&maxpos,color);
  996. }
  997.  
  998. void drawLineRect2d(float x1, float y1, float x2, float y2, Color32 color)
  999. {
  1000. Tuple2< float > minpos = Tuple2< float >(x1, y1);
  1001. Tuple2< float > maxpos = Tuple2< float >(x2, y2);
  1002. typedef void (__thiscall *tdrawLineRect2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
  1003. tdrawLineRect2d mdrawLineRect2d=(tdrawLineRect2d)OFFSET_DRAWLINERECT;
  1004. mdrawLineRect2d(this,&minpos,&maxpos,color);
  1005. }
  1006.  
  1007. void drawRect2d(float x1, float y1, float x2, float y2, Color32 color)
  1008. {
  1009. Tuple2< float > minpos = Tuple2< float >(x1, y1);
  1010. Tuple2< float > maxpos = Tuple2< float >(x2, y2);
  1011. typedef void (__thiscall *tdrawRect2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
  1012. tdrawRect2d mdrawRect2d=(tdrawRect2d)OFFSET_DRAWFILLRECT;
  1013. mdrawRect2d(this,&minpos,&maxpos,color);
  1014. }
  1015.  
  1016. void drawBox2d(float x1, float y1, float x2, float y2, float width, Color32 color) {
  1017. drawRect2d(x1, y1, x2, y1 + width, color);
  1018. drawRect2d(x1, y2 - width, x2, y2, color);
  1019. drawRect2d(x1, y1 + width, x1 + width, y1 - width, color);
  1020. drawRect2d(x2 - width, y1 + width, x2, y2 - width, color);
  1021. }
  1022. };
  1023. }
Add Comment
Please, Sign In to add comment