asdasdggg

This commit is contained in:
nullifiedcat 2016-11-30 16:27:46 +03:00
parent 7a9d69def2
commit 77801ccef2
7 changed files with 76 additions and 10 deletions

View File

@ -90,6 +90,7 @@
<entry excluding="targeting|followbot|copypasted|mem|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="followbot|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/followbot"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="targeting"/>
</sourceEntries>
</configuration>
</storageModule>
@ -141,6 +142,7 @@
<entry excluding="targeting|followbot|copypasted|mem|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="followbot|hacks|copypasted|mem|sdk" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/followbot"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="targeting"/>
</sourceEntries>
</configuration>
</storageModule>
@ -231,6 +233,7 @@
<entry excluding="targeting|followbot|copypasted|mem|sdk|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
<entry excluding="followbot|mem" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/followbot"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="targeting"/>
</sourceEntries>
</configuration>
</storageModule>

View File

@ -12,6 +12,7 @@ Proper AutoHitbox
Smoothe the smooth aim
Jumping ProjAim
Aim Key mode (inverse/normal/disabled)
Trigger ambassador correction
ESP Icons
ESP Distance sort
Don't Aim if can't shoot

View File

@ -61,11 +61,13 @@ HAimbot::HAimbot() {
this->v_iFOV = CreateConVar("u_aimbot_fov", "0", "FOV aimbot (experimental)");
this->v_bMachinaPenetration = CreateConVar("u_aimbot_machina", "0", "Machina penetration aimbot (just for fun)");
this->v_bSmooth = CreateConVar("u_aimbot_smooth", "0", "Smooth aimbot");
this->v_fSmoothValue = CreateConVar("u_aimbot_smooth_value", "5.0", "Smooth value");
this->v_fSmoothValue = CreateConVar("u_aimbot_smooth_value", "0.2", "Smooth value");
this->v_iAimKey = CreateConVar("u_aimbot_aimkey", "0", "Aim Key");
this->v_bAmbassador = CreateConVar("u_aimbot_ambassador", "0", "Ambassador mode."); // TODO
v_bAimBuildings = CreateConVar("u_aimbot_buildings", "1", "Aim at buildings");
v_bActiveOnlyWhenCanShoot = CreateConVar("u_aimbot_only_when_can_shoot", "1", "Aimbot active only when can shoot");
v_fSmoothAutoshootTreshold = CreateConVar("u_aimbot_smooth_autoshoot_treshold", "0.01", "Smooth aim autoshoot treshold");
this->v_fSmoothRandomness = CreateConVar("u_aimbot_smooth_randomness", "1.0", "Smooth randomness");
fix_silent = false;
}
@ -119,13 +121,22 @@ bool HAimbot::CreateMove(void*, float, CUserCmd* cmd) {
m_iHitbox = this->v_iHitbox->GetInt();
if (this->v_bAutoHitbox->GetBool()) m_iHitbox = 7;
if (g_pLocalPlayer->weapon) {
if (g_pLocalPlayer->weapon->GetClientClass()->m_ClassID == ClassID::CTFSniperRifle ||
g_pLocalPlayer->weapon->GetClientClass()->m_ClassID == ClassID::CTFSniperRifleDecap) {
switch (g_pLocalPlayer->weapon->GetClientClass()->m_ClassID) {
case ClassID::CTFSniperRifle:
case ClassID::CTFSniperRifleDecap:
if (!CanHeadshot(g_pLocalPlayer->entity)) {
if (this->v_bZoomedOnly->GetBool()) return true;
} else {
if (this->v_bAutoHitbox->GetBool()) m_iHitbox = 0;
}
break;
case ClassID::CTFCompoundBow:
m_iHitbox = 0;
break;
case ClassID::CTFRevolver:
if (this->v_bAmbassador->GetBool()) {
m_iHitbox = 0;
}
}
}
@ -304,18 +315,16 @@ bool HAimbot::Aim(IClientEntity* entity, CUserCmd* cmd) {
IClientEntity* local = interfaces::entityList->GetClientEntity(interfaces::engineClient->GetLocalPlayer());
Vector tr = (hit - g_pLocalPlayer->v_Eye);
fVectorAngles(tr, angles);
fClampAngle(angles);
bool smoothed = false;
if (this->v_bSmooth->GetBool()) {
Vector da = (angles - g_pLocalPlayer->v_OrigViewangles);
float fact = sqrt(da.x * da.x + da.y * da.y);
if (fact > this->v_fSmoothValue->GetFloat()) {
da.x = da.x / fact;
da.y = da.y / fact;
}
angles = g_pLocalPlayer->v_OrigViewangles + da;
fClampAngle(da);
smoothed = true;
if (da.IsZero(v_fSmoothAutoshootTreshold->GetFloat())) smoothed = false;
da *= this->v_fSmoothValue->GetFloat() * (((float)rand() / (float)RAND_MAX) * this->v_fSmoothRandomness->GetFloat());
angles = g_pLocalPlayer->v_OrigViewangles + da;
}
fClampAngle(angles);
cmd->viewangles = angles;
if (this->v_bSilent->GetBool()) {
g_pLocalPlayer->bUseSilentAngles = true;

View File

@ -52,6 +52,9 @@ public:
ConVar* v_bAmbassador;
ConVar* v_bAimBuildings;
ConVar* v_bActiveOnlyWhenCanShoot;
ConVar* v_fSmoothAutoshootTreshold;
ConVar* v_fSmoothRandomness;
ConVar* v_iPriorityMode;
};
extern HAimbot* g_phAimbot;

View File

@ -0,0 +1,18 @@
/*
* ITargetSystem.h
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#ifndef ITARGETSYSTEM_H_
#define ITARGETSYSTEM_H_
class ITargetSystem {
public:
virtual ~ITargetSystem();
virtual bool ShouldTarget(int idx) = 0;
virtual int GetScore(int idx) = 0;
};
#endif /* ITARGETSYSTEM_H_ */

View File

@ -0,0 +1,15 @@
/*
* TargetSystemSmart.cpp
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
bool TargetSystemSmart::ShouldTarget(int idx) {
return false;
}
int TargetSystemSmart::GetScore(int idx) {
return 0;
}

View File

@ -0,0 +1,17 @@
/*
* TargetSystemSmart.h
*
* Created on: Nov 30, 2016
* Author: nullifiedcat
*/
#ifndef TARGETSYSTEMSMART_H_
#define TARGETSYSTEMSMART_H_
class TargetSystemSmart : public ITargetSystem {
public:
bool ShouldTarget(int idx);
int GetScore(int idx);
};
#endif /* TARGETSYSTEMSMART_H_ */