Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef BF4MANAGER_H
- #define BF4MANAGER_H
- #include <windows.h>
- #include "D3D11.h"
- #include "D3DX10math.h"
- #define OFFSET_DBRENDERER 0x1401EDC90
- #define OFFSET_DRAWTEXT 0x1401EFF80
- #define OFFSET_DRAWLINE 0x1401EFB30
- #define OFFSET_DRAWLINERECT 0x1401EFBA0
- #define OFFSET_DRAWFILLRECT 0x1405dc7e0
- #define OFFSET_DXRENDERER 0x142DDF748
- #define OFFSET_GAMECONTEXT 0x142C8F540
- #define OFFSET_GAMERENDERER 0x142DDF8C8
- #define OFFSET_VIEWANGLES 0x1421d8360
- #define OFFSET_MAIN 0x1429C4140
- #define OFFSET_WORLDRENDERSETTINGS 0x14240bd38
- #define OFFSET_BORDERINPUTNODE 0x142496cb8
- #define OFFSET_ANTVTABLE 0x141b5e1a0
- #define OFFSET_SSMODULE 0x142E96C58
- #define OFFSET_CURRENT_WEAPONFIRING 0x1421d8378;
- class BoneCollisionComponent;
- class BorderInputNode;
- class Client;
- class ClientAnimatedSoldierWeaponHandler;
- class ClientAntAnimatableComponent;
- class ClientCharacterEntity;
- class ClientControllableEntity;
- class ClientPlayer;
- class ClientSoldierPrediction;
- class ClientRagDollComponent;
- class ClientSoldierEntity;
- class ClientVehicleEntity;
- class ClientWeapon;
- class DxRenderer;
- class DebugRenderer;
- class GameRenderer;
- class GameTime;
- class GameWorld;
- class HavokPhysicsManager;
- class IPhysicsRayCaster;
- class Main;
- class ProjectileData;
- class RayCastHit;
- class Screen;
- class SoldierEntity;
- class ShotConfigData;
- class UpdatePoseResultData;
- class WeaponModifier;
- class WeaponSway;
- class WorldRenderSettings;
- class ViewAngles;
- class WeaponSway
- {
- public:
- char pad_0x0000[304];
- float m_deviationPitch; //0x0130
- float m_deviationYaw; //0x0134
- float m_deviationRoll; //0x0138
- float m_deviationTransY; //0x013C
- float m_timeSinceLastShot; //0x0140
- DWORD m_cameraRecoilDeviation; //0x0144
- D3DXMATRIX m_cameraRecoilTransform; //0x0148
- char pad_0x0188[24];
- float m_dispersionAngle; //0x01A0
- float m_minDispersionAngle; //0x01A4
- float m_crossHairDispersionFactor; //0x01A8
- float m_currentDispersionPitch; //0x01AC
- float m_currentDispersionYaw; //0x01B0
- float m_currentDispersionRoll; //0x01B4
- float m_currentDispersionTransY; //0x01B8
- }; // Size 0x0438
- class ProjectileData
- {
- public:
- char _0x0000[304];
- float m_gravity; //0x0130
- float m_impactImpulse; //0x0134
- float m_detonationTimeVariation; //0x0138
- float m_vehicleDetonationRadius; //0x013C
- float m_vehicleDrtonationActivationDelay; //0x0140
- float m_flyBySoundRadius; //0x0144
- float m_flyBySoundSpeed; //0x0148
- float m_firstFraneTravelDistance; //0x014C
- float m_distributeDamageOverTime; //0x0150
- float m_DamageMaX; //0x0154
- float m_DamageMin; //0x0158
- float m_DamageFallOff; //0x015C
- float m_DamageFallOffEndDistance; //0x0160
- float m_TimeToArmExplosion; //0x0164
- char pad_0x0168[4];
- BYTE m_bHasVehicleDetination; //0x016C
- BYTE m_bInstantHit; //0x016D
- BYTE m_bStopTrail; //0x016E
- BYTE m_bUnk; //0x016F
- };
- class ShotConfigData
- {
- public:
- char pad_0x0000[136];
- float m_initialSpeed; //0x0088
- char pad_0x008C[20];
- float m_inheritWeaponSpeedAmount; //0x00A0
- char pad_0x00A4[12];
- ProjectileData* m_pProjectileData; //0x00B0
- ProjectileData* m_pSecondaryProjectileData; //0x00B8
- __int64 m_projectile; //0x00C0
- __int64 m_secondaryProjectile; //0x00C8
- float m_spawnDelay; //0x00D0
- DWORD m_numberOfBulletsPerShell; //0x00D4
- DWORD m_numberOfBulletsPerShot; //0x00D8
- DWORD m_numberOfBulletsPerBurst; //0x00DC
- BYTE m_relativeTargetAiming; //0x00E0
- BYTE m_forceSpawnToCamera; //0x00E1
- BYTE m_spawnVisualAtWeaponBone; //0x00E2
- BYTE m_activeForceSpawnToCamera; //0x00E3
- };
- class PrimaryFire
- {
- public:
- BYTE pad00[0x10]; // 0x0000
- ShotConfigData* m_shotConfigData; // 0x0010
- };
- class WeaponFiring
- {
- public:
- char pad_0x0000[120];
- WeaponSway* m_pSway; //0x0078
- char pad_0x0080[168];
- PrimaryFire* m_pPrimaryFire; //0x0128
- char pad_0x0130[24];
- DWORD m_weaponState; //0x0148
- DWORD m_lastWeaponState; //0x014C
- DWORD m_nextWeaponState; //0x0150
- char pad_0x0154[8];
- float m_timeToWait; //0x015C
- float m_reloadTimer; //0x0160
- float m_holdReleaseMinDelay; //0x0164
- float m_recoilTimer; //0x0168
- float m_recoilAngleX; //0x016C
- float m_recoilAngleY; //0x0170
- float m_recoilAngleZ; //0x0174
- float m_recoilFovAngle; //0x0178
- float m_recoilTimeMultiplier; //0x017C
- float m_overheatDropMultiplier; //0x0180
- __int32 m_primaryAmmoToFill; //0x0184
- __int32 m_reloadStage; //0x0188
- DWORD_PTR m_pCharacterMeleeEntity; //0x018C
- __int32 m_externalPrimaryMagazineCapacity; //0x0194
- char pad_0x0198[8];
- __int32 m_projectilesLoaded; //0x01A0
- __int32 m_projectilesInMagazines; //0x01A4
- __int32 m_numberOfProjectilesToFire; //0x01A8
- BYTE m_hasStoppedFiring; //0x01AC
- BYTE m_primaryFireTriggeredLastFrame; //0x01AD
- BYTE m_isOverheated; //0x01AE
- BYTE m_unknown; //0x01AF
- char pad_0x01B0[8];
- DWORD m_tickCounter; //0x01B8
- __int32 m_fireMode; //0x01BC
- char pad_0x01C0[8];
- DWORD_PTR m_pFiringHolderData; //0x01C8
- };
- class WeaponModifier
- {
- public:
- char pad_0x0000[64];
- BYTE m_breathControl; //0x0040
- BYTE m_supportedShooting; //0x0041
- BYTE m_unZoomOnBoltAction; //0x0042 Fixes unzoom When sniping
- BYTE m_holdBoltActionUntilZoomRelease; //0x0043
- };
- class ClientWeapon
- {
- public:
- class ControllableFinder
- {
- public:
- class ControllableResult
- {
- public:
- char pad_0x0000[112];
- D3DXVECTOR3 m_Collision; //0x0070
- };
- __int64 vtable; //0x0950
- char pad_0x0958[88];
- D3DXVECTOR4 m_lastRayBegin; //0x09B0
- D3DXVECTOR4 m_lastRayEnd; //0x09C0
- char pad_0x09CC[84];
- ControllableResult* m_pControllableResult; //0x0A28
- };
- char pad_0x0000[24];
- PrimaryFire* m_pWeaponFiring;
- WeaponModifier* m_pModifier; //0x0020
- char pad_0x0028[8];
- D3DXVECTOR3 m_moveSpeed; //0x0030
- float m_moveSpeedPad; //0x003C
- D3DXMATRIX m_shootSpace; //0x0040
- D3DXMATRIX m_shootSpaceIdentity; //0x0080
- char pad_0x00C0[464];
- float m_cameraFov; //0x0290
- float m_weaponFov; //0x0294
- float m_fovScaleFactor; //0x0298
- char pad_0x029C[20];
- DWORD m_zoomLevel; //0x02B0
- char pad_0x02B4[1692];
- ControllableFinder m_controllableFinder; //0x0950
- };
- class AimAssist
- {
- public:
- BYTE pad00[0x8]; //0x00
- BYTE pad01[0x8]; //0x08
- BYTE pad02[0x4]; //0x10
- float m_yaw; //0x14
- float m_pitch; //0x18
- };
- class ClientSoldierAimingEnvironment
- {
- public:
- char _0x0000[8];
- ClientSoldierEntity* m_soldier; //0x0008
- };//Size=0x0010
- class ClientSoldierAimingSimulation
- {
- public:
- char _0x0000[48];
- AimAssist* m_fpsAimer; //0x0030
- float m_yaw; //0x0038
- float m_pitch; //0x003C
- float m_aimYawTimer; //0x0040
- float m_aimPitchTimer; //0x0044
- D3DXVECTOR2 m_sway; //0x0048
- float m_DeltaTime; //0x0050
- char _0x0054[52];
- };
- class ClientSoldierWeapon
- {
- public:
- BYTE pad00[0x4988]; //0x0000
- ClientSoldierAimingSimulation* m_authorativeAiming; //0x4988
- BYTE pad01[0x8]; //0x4990
- BYTE pad02[0x8]; //0x4998
- BYTE pad03[0x8]; //0x49A0
- ClientWeapon* m_pWeapon; //0x49A8
- char pad_0x49B0[16]; //0x49B0
- WeaponFiring* m_pPrimary; //0x49C0
- };
- class ClientSoldierWeaponsComponent
- {
- public:
- class ClientAnimatedSoldierWeaponHandler
- {
- public:
- ClientSoldierWeapon* m_WeaponList[7]; //0x0000
- };
- enum WeaponSlot
- {
- M_PRIMARY = 0,
- M_SECONDARY = 1,
- M_GADGET = 2,
- M_GRENADE = 6,
- M_KNIFE = 7
- };
- char pad_0x0000[208];
- D3DXMATRIX m_weaponTransform; //0x00D0
- char pad_0x0110[1680];
- ClientAnimatedSoldierWeaponHandler* m_handler; //0x07A0
- char pad_0x07A8[32];
- ClientAntAnimatableComponent* m_animatableComponent[2]; //0x07C8
- ClientSoldierEntity* m_soldier; //0x07D8
- char pad_0x07E0[456];
- WeaponSlot m_activeSlot; //0x09A8
- WeaponSlot m_lastActiveSlot; //0x09AC
- WeaponSlot m_lastActiveWeaponSlot; //0x09B0
- char pad_0x09B4[28];
- int m_currentZoomLevel; //0x09D0
- int m_zoomLevelMax; //0x09D4
- int m_zeroingDistanceLevel; //0x09D8
- BYTE m_noMagnifierAccessory; //0x09DC
- char pad_0x09DD[779];
- float m_timeSinceLastShot; //0x0CE8
- ClientSoldierWeapon* GetActiveSoldierWeapon( )
- {
- if ( m_activeSlot == 0 || m_activeSlot == 1 )
- return m_handler->m_WeaponList[m_activeSlot];
- else
- return NULL;
- };
- };
- class UpdatePoseResultData
- {
- public:
- enum BONES
- {
- BONE_HEAD = 104,
- BONE_NECK = 142,
- BONE_SPINE2 = 7,
- BONE_SPINE1 = 6,
- BONE_SPINE = 5,
- BONE_LEFTSHOULDER = 9,
- BONE_RIGHTSHOULDER = 109,
- BONE_LEFTELBOWROLL = 11,
- BONE_RIGHTELBOWROLL = 111,
- BONE_LEFTHAND = 15,
- BONE_RIGHTHAND = 115,
- BONE_LEFTKNEEROLL = 188,
- BONE_RIGHTKNEEROLL = 197,
- BONE_LEFTFOOT = 184,
- BONE_RIGHTFOOT = 198
- };
- class QuatTransform
- {
- public:
- D3DXVECTOR4 m_TransAndScale; // 0x0000
- D3DXVECTOR4 m_Rotation; // 0x0010
- }; // Size 0x0020
- QuatTransform* m_LocalTransform; // 0x0000
- QuatTransform* m_WorldTransform; // 0x0008
- QuatTransform* DB00147A; // 0x0010
- QuatTransform* DB00147B; // 0x0018
- QuatTransform* DB00147D; // 0x0020
- QuatTransform* m_ActiveWorldTransforms; // 0x0028
- QuatTransform* m_ActiveLocalTransforms; // 0x0030
- __int32 m_Slot; // 0x0038
- __int32 m_ReaderIndex; // 0x003C
- BYTE m_ValidTransforms; // 0x0040
- BYTE m_PoseUpdateEnabled; // 0x0041
- BYTE m_PoseNeeded; // 0x0042
- BYTE pad44[0x01]; // 0x0044
- };
- class ClientAntAnimatableComponent
- {
- public:
- BYTE pad00[0x4C0];
- };
- class ClientRagDollComponent
- {
- public:
- char pad_0x0000[136];
- UpdatePoseResultData m_ragdollTransforms; //0x0088
- char pad_0x0090[1344];
- D3DXMATRIX m_Transform; //0x05D0
- };
- class BoneCollisionComponent
- {
- public:
- class BoneTransformInfo
- {
- public:
- D3DXMATRIX transform; // 0x00
- D3DXVECTOR4 position; // 0x40
- };
- char pad_0x0000[80];
- __int64 m_skeleton; //0x0050
- BoneTransformInfo* m_boneCollisionTransforms; //0x0058
- };
- class ClientControllableEntity
- {
- public:
- class HealthComponent
- {
- public:
- char pad_0x0000[32];
- float m_health; //0x0020
- float m_maxhealth; //0x0024
- char pad_0x0028[16];
- float m_vehicleHealth; //0x0038
- };
- virtual void Function0( ); //
- virtual void Function1( ); //
- virtual void Function2( ); //
- virtual void Function3( ); //
- virtual void Function4( ); //
- virtual void Function5( ); //
- virtual void Function6( ); //
- virtual void Function7( ); //
- virtual void Function8( ); //
- virtual void Function9( ); //
- virtual void Function10( ); //
- virtual void Function11( ); //
- virtual void Function12( ); //
- virtual void Function13( ); //
- virtual void Function14( ); //
- virtual void Function15( ); //
- virtual void Function16( ); //
- virtual void Function17( ); //
- virtual void Function18( ); //
- virtual void Function19( ); //
- virtual void Function20( ); //
- virtual void Function21( ); //
- virtual void Function22( ); //
- virtual void GetTransform( D3DXMATRIX* mTransform ); // ClientControllableEntity
- char pad_0x0008[248];
- float m_velocity; //0x0100
- char pad_0x0104[60];
- HealthComponent* m_pHealthComponent; //0x0140
- char pad_0x0148[64];
- };
- class ClientCharacterEntity : public ClientControllableEntity
- {
- public:
- char pad_0x0188[80]; //72 With vt?
- ClientPlayer* m_pPlayer; //0x01D8
- ClientAntAnimatableComponent* m_animatableComponent[2]; //0x01E0
- __int64 m_pCharacterCameraComponent; //0x01F0
- char pad_0x01F8[136];
- };
- class SoldierEntity
- {
- public:
- char pad_0x0000[256];
- __int64 m_pBoneCollisionComponent; //0x0100
- float m_moveSpeedMultiplier; //0x0108
- float m_sprintSpeedMultiplier; //0x010C
- float m_jumpHeightMultiplier; //0x0110
- float m_lookSpeedMultiplier; //0x0114
- float m_waterLevel; //0x0118
- float m_waterSpeed; //0x011C
- char pad_0x0120[8];
- __int64 m_pCharacterEntity; //0x0128
- };
- class ClientSoldierPrediction
- {
- public:
- char _0x0000[32];
- D3DXQUATERNION m_ParachuteRotation; //0x0020
- D3DXVECTOR3 m_Position; //0x0030
- char _0x003C[20];
- D3DXVECTOR3 m_Velocity; //0x0050
- char _0x005C[32];
- BYTE m_Pose; //0x007C
- char _0x007D[3];
- BYTE m_ChangingToPose; //0x0080
- char _0x0081[23];
- __int32 Event; //0x0098 make an enum
- __int32 PlayerState; //0x009C make an enum
- };//Size=0x00A0
- class AxisAlignedBox
- {
- public:
- __declspec( align( 16 ) )D3DXVECTOR3 min;
- __declspec( align( 16 ) )D3DXVECTOR3 max;
- };
- class ClientSoldierEntity : public ClientCharacterEntity, // +0x000
- public SoldierEntity // +0x280
- {
- public:
- class BreathControlHandler
- {
- public:
- char pad_0x0000[56];
- float m_breathControlTimer; //0x0038
- float m_breathControlMultiplier; //0x003C
- float m_breathControlPenaltyTimer; //0x0040
- float m_breathControlPenaltyMultiplier; //0x0044
- float m_breathControlActive; //0x0048
- float m_breathControlInput; //0x004C
- float m_breathActive; //0x0050
- char _0x0054[4];
- float IDONTKNOW; //0x0058
- };
- class SprintInputHandler
- {
- public:
- __int32 m_currentState; //0x0000
- float m_doubleTapTimer; //0x0004
- float m_sprintReleaseTimer; //0x0008
- __int32 m_waitForSprintRelease; //0x000C
- };
- char pad_0x03B0[216];
- __int64 m_pVehicleEntry; //0x0488
- ClientSoldierPrediction* m_pPredictedController; //0x0490
- char pad_0x0498[64];
- float m_authorativeYaw; //0x04D8
- float m_authorativePitch; //0x04DC
- __int32 m_aimingEnabled; //0x04E0
- float m_cachedPitch; //0x04E4
- __int64 m_soldierSound; //0x04E8
- __int32 m_poseType; //0x04F0
- char pad_0x04F4[92];
- ClientSoldierWeaponsComponent* m_soldierWeaponsComponent; //0x0550
- __int64 m_bodyComponent; //0x0558
- ClientRagDollComponent* m_ragdollComponent; //0x0560
- BreathControlHandler* m_breathControlHandler; //0x0568
- char pad_0x0570[16];
- SprintInputHandler* m_sprintInputHandler; //0x0580
- __int32 padThis; //0x0588
- float m_timeSinceLastSprinted; //0x058C
- BYTE m_sprinting; //0x0590
- BYTE m_occluded; //0x0591
- char pad_0x0592[286];
- __int64 m_pClientCharacterEntity; //0x06B0
- char pad_0x06B8[416];
- bool Visible( )
- {
- return !m_occluded;
- }
- ClientSoldierWeapon* GetActiveWeapon( )
- {
- if ( !m_soldierWeaponsComponent )
- return NULL;
- if ( ( DWORD_PTR )m_soldierWeaponsComponent > 0xFFFFFFFF )
- return NULL;
- if ( IsBadReadPtr( m_soldierWeaponsComponent, 8 ) )
- return NULL;
- return m_soldierWeaponsComponent->GetActiveSoldierWeapon( );
- }
- };
- class ClientVehicleEntity : public ClientControllableEntity
- {
- public:
- virtual void Function0( ); //
- virtual void Function1( ); //
- virtual void Function2( ); //
- virtual void Function3( ); //
- virtual void Function4( ); //
- virtual void Function5( ); //
- virtual void Function6( ); //
- virtual void Function7( ); //
- virtual void Function8( ); //
- virtual void Function9( ); //
- virtual void Function10( ); //
- virtual void Function11( ); //
- virtual void Function12( ); //
- virtual void Function13( ); //
- virtual void Function14( ); //
- virtual void Function15( ); //
- virtual void Function16( ); //
- virtual void Function17( ); //
- virtual void Function18( ); //
- virtual void Function19( ); //
- virtual void Function20( ); //
- virtual void Function21( ); //
- virtual void Function22( ); //
- virtual void GetTransform( D3DXMATRIX* mTransform );
- char pad_0x0188[176];
- float m_waterLevel; //0x0240
- float m_terrainLevel; //0x0244
- float m_waterLevelUpdateTimer; //0x0248
- float m_terrainLevelUpdateTimer; //0x024C
- AxisAlignedBox m_childrenAabb;
- char pad_0x0250[28];
- D3DXVECTOR3 m_vehicleSpeed; //0x0280
- };
- class ClientPlayer
- {
- public:
- char pad_0x0000[0x40]; //0x0000
- char Name[32]; //0x0040
- char pad_0x0060[0x1358]; //0x0060
- __int32 N000003B1; //0x13B8
- __int32 m_teamid; //0x13BC
- char pad_0x13C0[0xE0]; //0x13C0
- ClientSoldierEntity* m_pCorpse; //0x14A0
- ClientSoldierEntity* m_pSoldier; //0x14A8
- ClientSoldierEntity* m_pCharacter; //0x14B0
- ClientSoldierEntity* m_pAttachedControllable; //0x14B8
- __int32 m_iAttachedEntryId; //0x14C0
- __int32 m_iControlledEntryId; //0x14C4
- ClientSoldierEntity* m_pControlledControllable; //0x14C8
- char pad_0x14D0[0x3D8]; //0x14D0
- ClientSoldierEntity* GetClientSoldier()
- {
- if (m_pControlledControllable)
- return m_pControlledControllable;
- return NULL;
- }
- };//Size=0x14D0
- template <class T>
- class vector // Size = 32b = 0x20 //x64 ONLY
- {
- private:
- T* m_firstElement;
- T* m_lastElement;
- T* m_arrayBound;
- LPVOID vftable;
- public:
- int Size() { return (((DWORD64)m_lastElement - (DWORD64)m_firstElement) / 8); }
- T At(int nIndex) { return *(T*)((DWORD64)m_firstElement + (nIndex * sizeof(T))); }
- T operator [](int index) { return At(index); }
- };
- class ClientPlayerManager
- {
- public:
- char _0x0000[16];
- __int32 iMaxPlayerCount; //0x0010 NotSure
- __int32 iUnk; //0x0014
- __int32 iUnk2; //0x0018
- char _0x001C[1332];
- ClientPlayer* pLocalPlayer; //0x0550
- char _0x0558[504];
- ClientPlayer** pPlayerList; //0x0750
- char _0x0758[1232];
- ClientPlayer* GetPlayerByID(unsigned int ID)
- {
- if (ID < 40)
- {
- ClientPlayer* tmp = *(ClientPlayer**)((DWORD_PTR)pPlayerList + (ID * 0x8));
- if (tmp)
- return (ClientPlayer*)tmp;
- }
- return nullptr;
- }
- };//Size=0x0C28
- class RayCastHit
- {
- public:
- D3DXVECTOR4 m_position; //0x0000
- D3DXVECTOR4 m_normal; //0x0010
- char pad_0x0020[80];
- };
- class IPhysicsRayCaster
- {
- public:
- enum RayCastFlags
- {
- NoCheck = 0,
- CheckDetailMesh = 0x0DB,
- IsAsyncRaycast = 0x2,
- DontCheckWater = 0x0FD,
- DontCheckTerrain = 0x07A,
- DontCheckRagdoll = 0x10,
- DontCheckCharacter = 0x20,
- DontCheckGroup = 0x40,
- DontCheckPhantoms = 0x80,
- };
- virtual bool PhysicsRayQuery( const char* identifier, D3DXVECTOR4* from, D3DXVECTOR4* to, RayCastHit* hit, int flag, void* PhysicsEntityList );
- };
- class GameWorld
- {
- public:
- BYTE pad00[0x58]; // 0x00
- IPhysicsRayCaster* m_RayCaster; // 0x0058
- };
- class WorldRenderSettings
- {
- public:
- char pad_0x0000[120];
- float m_motionBlurScale; //0x0078
- float m_motionBlurMax; //0x007C
- float m_motionBlurNoiseScale; //0x0080
- DWORD m_motionBlurQuality; //0x0084
- DWORD m_dynamicEnvmapResolution; //0x0088
- DWORD m_maxDecalVolumeCount; //0x008C
- DWORD m_motionBlurMaxSampleCount; //0x0090
- DWORD m_motionBlurFrameAverageCount; //0x0094
- float m_motionBlurMaxFrameTime; //0x0098
- float m_forceMotionBlurDepthCutoff; //0x009C
- float m_forceMotionBlurCutoffGradientScale; //0x00A0
- DWORD m_multisampleCount; //0x00A4
- float m_multisampleThreshold; //0x00A8
- DWORD m_maxSpotLightShadowCount; //0x00AC
- DWORD m_reflectionEnvmapSize; //0x00B0
- float m_spotLightNearPlane; //0x00B4
- float m_subSurfaceRolloff; //0x00B8
- DWORD m_unk0; //0x00BC
- DWORD m_maxSpotLightCount; //0x00C0
- DWORD m_spotLightShadowmapResolution; //0x00C4
- DWORD m_spotLightShadowmapQuality; //0x00C8
- char pad_0x00CC[105];
- BYTE m_drawSky; //0x0135
- BYTE m_drawSunRays; //0x0136
- BYTE m_drawFog; //0x0137
- BYTE m_drawSunBlur; //0x0138
- char pad_0x0139[285];
- BYTE m_drawSunRays2; //0x0256
- static WorldRenderSettings* GetInstance( )
- {
- return *( WorldRenderSettings** )OFFSET_WORLDRENDERSETTINGS;
- }
- };
- class HavokPhysicsManager
- {
- public:
- BYTE pad00[0x120]; // 0x00
- GameWorld* m_GameWorld; // 0x120
- };
- class ClientGameContext
- {
- public:
- BYTE pad00[0x20]; // 0x00
- DWORD_PTR m_GameTime; // 0x20
- HavokPhysicsManager* m_pPhysicsManager; // 0x28
- BYTE pad30[0x30]; // 0x30
- ClientPlayerManager* m_pPlayerManager; // 0x60
- static ClientGameContext* GetInstance( )
- {
- return *( ClientGameContext** )( OFFSET_GAMECONTEXT );
- }
- };
- class GameTime
- {
- public:
- DWORD m_ticks; //0x0000
- DWORD m_tickFrequency; //0x0004
- DWORD m_tickIndexInFrame; //0x0008
- DWORD m_lastTickIndexInFrame; //0x000C
- DWORD m_tickCountInFrame; //0x0010
- float m_deltaTime; //0x0014
- float m_passedDeltaTimeInFrame; //0x0018
- };
- class Client
- {
- public:
- char pad_0x0000[40];
- ClientGameContext* m_pGameContext; //0x0028
- __int64 m_pSettings; //0x0030
- char pad_0x0038[8];
- ClientPlayerManager* m_pClientPlayerManager; //0x0040
- char pad_0x0048[24];
- GameTime* m_pGameTime; //0x0060
- BorderInputNode* m_pBorderInputNode; //0x0068
- };
- class Main
- {
- public:
- char pad_0x0000[32];
- BYTE m_isDedicatedServer; //0x0020
- BYTE m_isDedicatedServerData; //0x0021
- BYTE m_isPaused; //0x0022
- char pad_0x0024[45];
- Client* m_pClient; //0x0050
- static Main* GetInstance( )
- {
- return *( Main** )( OFFSET_MAIN );
- }
- };
- class RenderView
- {
- public:
- char pad1[0x40];
- //D3DXMATRIX m_Transform; //0x0040
- D3DXVECTOR3 vLeft;
- float f01;
- D3DXVECTOR3 vUp;
- float f02;
- D3DXVECTOR3 vForward;
- float f03;
- D3DXVECTOR3 vOrigin;
- float f04;
- char pad2[0x34];
- float m_FovY; //0x00B4
- char pad3[0xC];
- float m_Aspect; //0x00C4
- char padss[0x358];
- D3DXMATRIX m_ViewProj; //0x460
- };
- class GameRenderer
- {
- public:
- BYTE pad00[0x58]; // 0x00
- RenderView* m_pRenderView; // 0x58
- static GameRenderer* GetInstance( )
- {
- return *( GameRenderer** )( OFFSET_GAMERENDERER );
- }
- };
- class RenderScreenInfo
- {
- public:
- __int32 m_Width; //0x0000
- __int32 m_Height; //0x0004
- __int32 m_WindowWidth; //0x0008
- __int32 m_WindowHeight; //0x000C
- float m_RefreshRate; //0x0010
- char _0x0014[4];
- };
- class Screen
- {
- public:
- char _0x0000[8];
- uintptr_t m_WindowHandle; //0x0008
- char _0x0010[76];
- BYTE m_TopWindow; //0x005C
- BYTE m_Minimized; //0x005D
- BYTE m_Maximized; //0x005E
- BYTE m_Resizing; //0x005F
- char _0x0060[8];
- RenderScreenInfo m_ScreenInfo; //0x0068
- char _0x0080[504];
- IDXGISwapChain* m_pSwapChain; //0x0278
- char _0x0280[32];
- uintptr_t m_pDefaultRenderView; //0x02A0
- };
- class DxRenderer
- {
- public:
- virtual void Function0();
- char _0x0008[1992];
- __int32 m_FrameCounter1; //0x07D0
- __int32 m_FrameCounter2; //0x07D4
- BYTE m_FrameInProgress; //0x07D8
- char _0x07D9[7];
- Screen* m_pScreen; //0x07E0
- char _0x07E8[56];
- uintptr_t m_pDisplaySettings; //0x0820 fb::Dx11DisplaySettings
- char _0x0828[48];
- ID3D11Device* m_pDevice; //0x0858
- ID3D11DeviceContext* m_pContext; //0x0860
- char _0x0868[120];
- char* m_pAdapterName; //0x08E0
- public:
- static DxRenderer* GetInstance()
- {
- return *reinterpret_cast<DxRenderer**>(0x142DE1EE8);
- }
- };
- class BorderInputNode
- {
- public:
- virtual void Function0();
- virtual void Function1();
- void* m_pInputCache; //0x0008
- char _0x0010[0x38];
- void* m_pInputNode; //0x0048
- static BorderInputNode* GetInstance()
- {
- return (BorderInputNode*)(*((*(void***)0x1429412C0) + 1));
- }
- };
- class ViewAngles
- {
- public:
- BYTE pad00[0x14]; // 0x00
- float yaw; // 0x14
- float pitch; // 0x18
- static ViewAngles* GetInstance( )
- {
- return *( ViewAngles** )(*( DWORD_PTR* )(*( DWORD_PTR* )( OFFSET_VIEWANGLES ) + 0x4988) + 0x10);
- }
- };
- #endif
- namespace fb
- {
- template <class T>
- class Tuple2
- {
- public:
- T Element1;
- T Element2;
- public:
- Tuple2(T _Element1, T _Element2)
- {
- Element1=_Element1;
- Element2=_Element2;
- }
- };
- class Color32
- {
- public:
- union
- {
- struct
- {
- BYTE R;
- BYTE G;
- BYTE B;
- BYTE A;
- };
- DWORD dwColor;
- };
- public:
- Color32(const DWORD _Color)
- {
- dwColor=_Color;
- }
- Color32(const BYTE Red,const BYTE Green,const BYTE Blue, const BYTE Alpha)
- {
- A=Alpha;
- R=Red;
- G=Green;
- B=Blue;
- }
- };
- class DebugRenderer2
- {
- public:
- static DebugRenderer2* Singleton(void) //Credits to KingOrgy for giving me some hints
- {
- typedef fb::DebugRenderer2* (__stdcall* fb__DebugRenderManager_getThreadContext_t)(void);
- fb__DebugRenderManager_getThreadContext_t fb__DebugRenderManager_getThreadContext=(fb__DebugRenderManager_getThreadContext_t)OFFSET_DBRENDERER;
- return fb__DebugRenderManager_getThreadContext();
- }
- void drawText(int x, int y, Color32 color, char* text, float scale)
- {
- typedef void (__thiscall *tdrawText)(fb::DebugRenderer2*,int, int, char*, Color32,float);
- tdrawText mdrawText=(tdrawText)OFFSET_DRAWTEXT;
- mdrawText(this,x,y,text,color,scale);
- }
- void drawLine2d(float x1, float y1, float x2, float y2, Color32 color)
- {
- Tuple2< float > minpos = Tuple2< float >(x1, y1);
- Tuple2< float > maxpos = Tuple2< float >(x2, y2);
- typedef void (__thiscall *tdrawLine2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
- tdrawLine2d mdrawLine2d=(tdrawLine2d)OFFSET_DRAWLINE;
- mdrawLine2d(this,&minpos,&maxpos,color);
- }
- void drawLineRect2d(float x1, float y1, float x2, float y2, Color32 color)
- {
- Tuple2< float > minpos = Tuple2< float >(x1, y1);
- Tuple2< float > maxpos = Tuple2< float >(x2, y2);
- typedef void (__thiscall *tdrawLineRect2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
- tdrawLineRect2d mdrawLineRect2d=(tdrawLineRect2d)OFFSET_DRAWLINERECT;
- mdrawLineRect2d(this,&minpos,&maxpos,color);
- }
- void drawRect2d(float x1, float y1, float x2, float y2, Color32 color)
- {
- Tuple2< float > minpos = Tuple2< float >(x1, y1);
- Tuple2< float > maxpos = Tuple2< float >(x2, y2);
- typedef void (__thiscall *tdrawRect2d)(fb::DebugRenderer2*,Tuple2<float>*, Tuple2<float>*, Color32);
- tdrawRect2d mdrawRect2d=(tdrawRect2d)OFFSET_DRAWFILLRECT;
- mdrawRect2d(this,&minpos,&maxpos,color);
- }
- void drawBox2d(float x1, float y1, float x2, float y2, float width, Color32 color) {
- drawRect2d(x1, y1, x2, y1 + width, color);
- drawRect2d(x1, y2 - width, x2, y2, color);
- drawRect2d(x1, y1 + width, x1 + width, y1 - width, color);
- drawRect2d(x2 - width, y1 + width, x2, y2 - width, color);
- }
- };
- }
Add Comment
Please, Sign In to add comment