#ifndef _CLASSES_H
#define _CLASSES_H
class cWeaponInfo;
class cWeaponMgr;
class cWeaponMgr
{
public:
char unknown0[5564];
cWeaponInfo** Weapons; //15BC
__int32 WeaponCount; //15C0
};
class cWeaponInfo
{
public:
char _0x0000[12];
DWORD dwClientWeaponType; //0x000C
DWORD dwAniType; //0x0010
DWORD dwLowerAniType; //0x0014
//D3DXVECTOR3 Pos; //0x0018 Not Sure :P
char _0x0024[508];
DWORD dwFireSndRadius; //0x021C
DWORD dwFireSndVolume; //0x0220
char _0x0224[4];
DWORD dwCrossHairA; //0x0228
DWORD dwCrossHairR; //0x022C
DWORD dwCrossHairG; //0x0230
DWORD dwCrossHairB; //0x0234
BYTE TripleShotMode; //0x0238
char _0x0239[3];
DWORD dwTripleShotRoundNum; //0x023C
char _0x0240[24];
DWORD dwReloadSndRadius; //0x0258
DWORD dwSelectSndRadius; //0x025C
DWORD dwEnvironmentMap; //0x0260
DWORD dwInfiniteAmmo; //0x0264
DWORD dwHideWhenEmpty; //0x0268
DWORD dwIsAmmo; //0x026C
char _0x0270[4];
DWORD dwShotsPerClip; //0x0274
BYTE ReloadPerBullet; //0x0278 MovZX
char _0x0279[35];
float fDynamicPerturbFactor; //0x029C
float fDynnamicPerturbFactorRun; //0x02A0
float fDynnamicPerturbFactorWalk; //0x02A4
float fDynnamicPerturbFactorJump; //0x02A8
float fZoomTime; //0x02AC
DWORD dwMinPerturb; //0x02B0
DWORD dwMaxPerturb; //0x02B4
float fDuckPerturb; //0x02B8
float fMoveDuckPerturb; //0x02BC
DWORD dwZoomedMinPerturb; //0x02C0
DWORD dwZoomedMaxPerturb; //0x02C4
DWORD dwRange; //0x02C8
char _0x02CC[12];
DWORD dwVectorsPerRound; //0x02D8
char _0x02DC[32];
DWORD dwFireDelay; //0x02FC
float fMovePenalty; //0x0300
float fPerturbIncSpeed; //0x0304
float fPerturbDecSpeed; //0x0308
float fZoomedMovePenalty; //0x030C
float fZoomedPerturbIncSpeed; //0x0310
float fZoomedPerturbDecSpeed; //0x0314
float fMaxCamRecoilPitch; //0x0318
float fBaseCamRecoilPitch; //0x031C
float fBaseCamRecoilAccelPitch; //0x0320
float fMaxCamRecoilYaw; //0x0324
float fBaseCamRecoilYaw; //0x0328
float fMaxCamRecoilWag; //0x032C
float fBaseCamRecoilWagR; //0x0330
float fBaseCamRecoilWagL; //0x0334
float fMaxRandomPitch; //0x0338
float fMaxRandomWag; //0x033C
float fWhiteScreenDecl; //0x0340
float fCapturedDecl; //0x0344
float fTripleShotMaxCamRecoilPitch; //0x0348
float fTripleShotBaseCamRecoilPitch; //0x034C
float fBaseCamBackJitter; //0x0350
float fBackJitterRecover; //0x0354
DWORD dwTripleShotMinPerturb; //0x0358
DWORD dwTripleShotMaxPerturb; //0x035C
float fTripleShotPerturbIncSpeed; //0x0360
float fTripleShotPerturbDecSpeed; //0x0364
DWORD dwHudFireMode; //0x0368
char _0x036C[144];
DWORD dwTripleShotDelay; //0x03FC
DWORD dwTripleShotSelectDelay; //0x0400
BYTE DisableCrosshair; //0x0404
char _0x0405[3];
DWORD dwRapidFireCount; //0x0408
char _0x040C[4];
DWORD dwNoSelect; //0x0410
char _0x0414[4];
float fCameraSwayXSpeed; //0x0418
float fCameraSwayYSpeed; //0x041C
float fCameraSwayXFreq; //0x0420
float fCameraSwayYFreq; //0x0424
float fGrenadeSpeed ; //0x0428
DWORD dwGrenadeAttach; //0x042C
DWORD dwGrenadeSlide; //0x0430
DWORD dwTargetCrossHairFlag; //0x0434
DWORD dwEffectRange; //0x0438
char _0x043C[4];
DWORD dwGuntype; //0x0440
char _0x0444[16];
DWORD dwMuzzleOPtion; //0x0454
DWORD dwSightOption; //0x0458
DWORD dwMagazineOption; //0x045C
DWORD dwAirStrikeID; //0x0460
char _0x0464[4];
float fAirDropHeight; //0x0468
float fAirDropDelay; //0x046C
char _0x0470[32];
DWORD dwAlt_Effectrange; //0x0490
char _0x0494[24];
DWORD dwShoutMsgShowTime; //0x04AC
DWORD dwScanSendTime; //0x04B0
DWORD dwScanDist; //0x04B4
DWORD dwBatteryRefillQuantity; //0x04B8
DWORD dwBatteryUsingQuantity; //0x04BC
DWORD dwBatteryMaxQuantity; //0x04C0
DWORD dwBatteryRefillTime; //0x04C4
char _0x04C8[108];
BYTE DamageWeapon; //0x0534
char _0x0535[3];
};//Size=0x0538
#endif
void cHacks::hAimCorrection(int Flag)
{
if( !Hacks.Flags.Check )
{
cWeaponMgr* WepMgr = *(cWeaponMgr**)Addresses.Address[WeaponInfo].Value;
if( WepMgr != 0 )
{
for( int i = 0; i < WepMgr->WeaponCount; i++ )
{
cWeaponInfo* Wep = WepMgr->Weapons[i];
if( Wep != 0 )
{
Hacks.fValues[0][i] = Wep->fDuckPerturb;
Hacks.fValues[1][i] = Wep->fMoveDuckPerturb;
Hacks.fValues[2][i] = Wep->fPerturbIncSpeed;
Hacks.fValues[3][i] = Wep->fPerturbDecSpeed;
Hacks.fValues[4][i] = Wep->fCameraSwayXFreq;
Hacks.fValues[5][i] = Wep->fCameraSwayYFreq;
Hacks.fValues[6][i] = Wep->fZoomedPerturbIncSpeed;
Hacks.fValues[7][i] = Wep->fZoomedPerturbDecSpeed;
Hacks.fValues[8][i] = Wep->fTripleShotMaxCamRecoilPitch;
Hacks.fValues[9][i] = Wep->fTripleShotBaseCamRecoilPitch;
Hacks.fValues[10][i] = Wep->fTripleShotPerturbIncSpeed;
Hacks.fValues[11][i] = Wep->fTripleShotPerturbDecSpeed;
Hacks.fValues[12][i] = Wep->fBaseCamRecoilPitch;
Hacks.fValues[13][i] = (float)Wep->fBaseCamRecoilAccelPitch;
Hacks.fValues[14][i] = (float)Wep->dwTripleShotMinPerturb;
Hacks.fValues[15][i] = (float)Wep->dwTripleShotMaxPerturb;
Hacks.fValues[16][i] = (float)Wep->dwMaxPerturb;
Hacks.fValues[17][i] = (float)Wep->dwMinPerturb;
Hacks.fValues[18][i] = (float)Wep->dwZoomedMaxPerturb;
Hacks.fValues[19][i] = (float)Wep->dwZoomedMinPerturb;
}
}
}
Hacks.Flags.Check = true;
}
if( Flag )
{
if( Hacks.Flags.Check )
{
cWeaponMgr* WepMgr = (cWeaponMgr*)Addresses.Address[WeaponInfo].Value;
if( WepMgr )
{
for( int i = 0; i < WepMgr->WeaponCount; i++ )
{
cWeaponInfo* Wep = WepMgr->Weapons[i];
if( Wep )
{
Wep->fDuckPerturb = 0.0f;
Wep->fMoveDuckPerturb = 0.0f;
Wep->fPerturbIncSpeed = 0.0f;
Wep->fPerturbDecSpeed = 0.0f;
Wep->fCameraSwayXFreq = 0.0f;
Wep->fCameraSwayYFreq = 0.0f;
Wep->fZoomedPerturbIncSpeed = 0.0f;
Wep->fZoomedPerturbDecSpeed = 0.0f;
Wep->fTripleShotMaxCamRecoilPitch = 0.0f;
Wep->fTripleShotBaseCamRecoilPitch = 0.0f;
Wep->fTripleShotPerturbIncSpeed = 0.0f;
Wep->fTripleShotPerturbDecSpeed = 0.0f;
Wep->fBaseCamRecoilPitch = 0.0f;
Wep->fBaseCamRecoilAccelPitch = 0.0f;
Wep->dwTripleShotMinPerturb = 0;
Wep->dwTripleShotMaxPerturb = 0;
Wep->dwMaxPerturb = 0;
Wep->dwMinPerturb = 0;
Wep->dwZoomedMaxPerturb = 0;
Wep->dwZoomedMinPerturb = 0;
}
}
}
}
}
else
{
if( Hacks.Flags.Check )
{
cWeaponMgr* WepMgr = (cWeaponMgr*)Addresses.Address[WeaponInfo].Value;
if( WepMgr )
{
for( int i = 0; i < WepMgr->WeaponCount; i++ )
{
cWeaponInfo* Wep = WepMgr->Weapons[i];
if( Wep )
{
Wep->fDuckPerturb = Hacks.fValues[0][i];
Wep->fMoveDuckPerturb = Hacks.fValues[1][i];
Wep->fPerturbIncSpeed = Hacks.fValues[2][i];
Wep->fPerturbDecSpeed = Hacks.fValues[3][i];
Wep->fCameraSwayXFreq = Hacks.fValues[4][i];
Wep->fCameraSwayYFreq = Hacks.fValues[5][i];
Wep->fZoomedPerturbIncSpeed = Hacks.fValues[6][i];
Wep->fZoomedPerturbDecSpeed = Hacks.fValues[7][i];
Wep->fTripleShotMaxCamRecoilPitch = Hacks.fValues[8][i];
Wep->fTripleShotBaseCamRecoilPitch = Hacks.fValues[9][i];
Wep->fTripleShotPerturbIncSpeed = Hacks.fValues[10][i];
Wep->fTripleShotPerturbDecSpeed = Hacks.fValues[11][i];
Wep->fBaseCamRecoilPitch = Hacks.fValues[12][i];
Wep->fBaseCamRecoilAccelPitch = Hacks.fValues[13][i];
Wep->dwTripleShotMinPerturb = (DWORD)Hacks.fValues[14][i];
Wep->dwTripleShotMaxPerturb = (DWORD)Hacks.fValues[15][i];
Wep->dwMaxPerturb = (DWORD)Hacks.fValues[16][i];
Wep->dwMinPerturb = (DWORD)Hacks.fValues[17][i];
Wep->dwZoomedMaxPerturb = (DWORD)Hacks.fValues[18][i];
Wep->dwZoomedMinPerturb = (DWORD)Hacks.fValues[19][i];
}
}
}
Hacks.Flags.Check = false;
}
}
}