diff --git a/uran/.cproject b/uran/.cproject
index 516e44fd..fab8b5f4 100644
--- a/uran/.cproject
+++ b/uran/.cproject
@@ -90,6 +90,7 @@
+
@@ -141,6 +142,7 @@
+
@@ -231,6 +233,7 @@
+
diff --git a/uran/TODO b/uran/TODO
index 3d5490ae..ede43860 100644
--- a/uran/TODO
+++ b/uran/TODO
@@ -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
diff --git a/uran/src/hacks/HAimbot.cpp b/uran/src/hacks/HAimbot.cpp
index 3eb80f7c..66078ccc 100644
--- a/uran/src/hacks/HAimbot.cpp
+++ b/uran/src/hacks/HAimbot.cpp
@@ -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;
diff --git a/uran/src/hacks/HAimbot.h b/uran/src/hacks/HAimbot.h
index dedd3061..2cfc35fe 100644
--- a/uran/src/hacks/HAimbot.h
+++ b/uran/src/hacks/HAimbot.h
@@ -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;
diff --git a/uran/targeting/ITargetSystem.h b/uran/targeting/ITargetSystem.h
new file mode 100644
index 00000000..65d69972
--- /dev/null
+++ b/uran/targeting/ITargetSystem.h
@@ -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_ */
diff --git a/uran/targeting/TargetSystemSmart.cpp b/uran/targeting/TargetSystemSmart.cpp
new file mode 100644
index 00000000..527f4e9c
--- /dev/null
+++ b/uran/targeting/TargetSystemSmart.cpp
@@ -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;
+}
+
diff --git a/uran/targeting/TargetSystemSmart.h b/uran/targeting/TargetSystemSmart.h
new file mode 100644
index 00000000..6169e6f5
--- /dev/null
+++ b/uran/targeting/TargetSystemSmart.h
@@ -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_ */