diff --git a/TODO b/TODO
index 56928a71..6b8fe6c3 100755
--- a/TODO
+++ b/TODO
@@ -20,23 +20,16 @@ Improve Projectile Aimbot. A lot. // //
ProjPredOrigin // //
MAX -> MIN priority // //
// //
-Hunter Rifle? // //
// //
// //
-Ambassador bodyshotting // //
No Trigger Mediguns // //
More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike) // //
-Auto trigger DR before rockets // //
// //
// //
Make building aimbot compensate for gravity on projectile weapons // //
// //
add Spectator Silent for projectile weapons // //
// //
-Improve aimbot accuracy // //
- // //
- // //
- // //
// //
// //
//------------------------------------------------------------------------------------------------------------------// //
@@ -97,10 +90,8 @@ dominatesay assistsay worldsay // //
//Followbots //
//------------------------------------------------------------------------------------------------------------------// //
// //
-Proper medic followbot AI, breadcrumb followbot is good but a nav system would be better // //
// //
Bot option for aiming at owner's prey (just for fun) // //
-Bot pathfinding & navigation files system // //
Proper entity classes (actually I might just use a lot of helper functions taking IClientEntity* as first arg) // //
// //
//------------------------------------------------------------------------------------------------------------------// //
@@ -117,15 +108,11 @@ Proper entity classes (actually I might just use a lot of helper functions takin
// //
Spy alert uses angles // //
// //
-Add ignore gunslinger to melee crit hack // //
- // //
Priority system optimization and testing // //
General optimization and refactoring // //
// //
XorString or something to make it harder to detect. // //
// //
-TF2C teams // //
-TF2C merc // //
HL2DM teams // //
// //
//------------------------------------------------------------------------------------------------------------------// //
diff --git a/data/menu/nullifiedcat/antiaim.xml b/data/menu/nullifiedcat/antiaim.xml
index 5df916f5..8c97af25 100755
--- a/data/menu/nullifiedcat/antiaim.xml
+++ b/data/menu/nullifiedcat/antiaim.xml
@@ -50,6 +50,7 @@
+
diff --git a/include/core/offsets.hpp b/include/core/offsets.hpp
index dbd68ef8..f6f32b08 100755
--- a/include/core/offsets.hpp
+++ b/include/core/offsets.hpp
@@ -168,7 +168,7 @@ struct offsets
}
static constexpr uint32_t PreDataUpdate()
{
- return PlatformOffset(14, undefined, undefined);
+ return PlatformOffset(17, undefined, undefined);
}
static constexpr uint32_t Paint()
{
diff --git a/include/hacks/AutoBackstab.hpp b/include/hacks/AutoBackstab.hpp
index c19e699d..9cd91ce5 100644
--- a/include/hacks/AutoBackstab.hpp
+++ b/include/hacks/AutoBackstab.hpp
@@ -11,5 +11,5 @@ namespace hacks::tf2::autobackstab
{
void CreateMove();
-const Vector GetWorldSpaceCenter(CachedEntity *ent);
+void Draw();
} // namespace hacks::tf2::autobackstab
diff --git a/include/reclasses/C_TFWeaponBase.hpp b/include/reclasses/C_TFWeaponBase.hpp
index 021b0f54..cb0637c5 100644
--- a/include/reclasses/C_TFWeaponBase.hpp
+++ b/include/reclasses/C_TFWeaponBase.hpp
@@ -163,13 +163,9 @@ public:
else
{
if (AreRandomCritsEnabled(self))
- {
return CalcIsAttackCriticalHelper(self);
- }
else
- {
return CalcIsAttackCriticalHelperNoCrits(self);
- }
}
}
}
diff --git a/src/crits.cpp b/src/crits.cpp
index 0d7ab480..e033ee7d 100644
--- a/src/crits.cpp
+++ b/src/crits.cpp
@@ -20,7 +20,12 @@ int *g_PredictionRandomSeed = nullptr;
namespace criticals
{
-
+CatCommand test("crit_debug_print", "debug", []() {
+ bool test = (*((unsigned char *) RAW_ENT(LOCAL_E) + 9645) & 2) >> 1;
+ int test2 = (*((unsigned char *) RAW_ENT(LOCAL_E) + 9645) & 2);
+ int test3 = (*((unsigned *) RAW_ENT(LOCAL_E) + 9645));
+ logging::Info("%d, %d, %d", test, test2, test3);
+});
int find_next_random_crit_for_weapon(IClientEntity *weapon)
{
int tries = 0, number = current_user_cmd->command_number, found = 0, seed,
diff --git a/src/hacks/AntiAim.cpp b/src/hacks/AntiAim.cpp
index 657240ed..2d541b4f 100644
--- a/src/hacks/AntiAim.cpp
+++ b/src/hacks/AntiAim.cpp
@@ -404,10 +404,7 @@ void FakeCrouch(CUserCmd *cmd)
void ProcessUserCmd(CUserCmd *cmd)
{
if (!enable)
- {
- *bSendPackets = true;
return;
- }
if (!ShouldAA(cmd))
return;
static bool keepmode = true;
@@ -416,6 +413,7 @@ void ProcessUserCmd(CUserCmd *cmd)
float &y = cmd->viewangles.y;
static bool flip = false;
static bool bsendflip = true;
+ static float rngyaw = 0.0f;
bool clamp = !no_clamping;
switch ((int) yaw_mode)
{
@@ -546,6 +544,15 @@ void ProcessUserCmd(CUserCmd *cmd)
y = useEdge(y) + 180.0f;
}
break;
+ case 22: // Omegayaw
+ if (*bSendPackets)
+ {
+ rngyaw = RandFloatRange(-180.0f, 180.0f);
+ y = rngyaw;
+ }
+ else
+ y = rngyaw - 180.0f;
+ break;
default:
break;
}
diff --git a/src/hacks/AutoBackstab.cpp b/src/hacks/AutoBackstab.cpp
index 77fd4b53..185738a5 100644
--- a/src/hacks/AutoBackstab.cpp
+++ b/src/hacks/AutoBackstab.cpp
@@ -256,4 +256,49 @@ void CreateMove()
}
}
}
+const Vector GetWorldSpaceCenter(CachedEntity *ent)
+{
+ Vector vMin, vMax;
+ RAW_ENT(ent)->GetRenderBounds(vMin, vMax);
+ Vector vWorldSpaceCenter = RAW_ENT(ent)->GetAbsOrigin();
+ vWorldSpaceCenter.z += (vMin.z + vMax.z) / 2;
+ return vWorldSpaceCenter;
+}
+void Draw()
+{
+ int idx = -1;
+ Vector result{};
+ WhatIAmLookingAt(&idx, &result);
+ if (idx == -1)
+ return;
+ CachedEntity *target = ENTITY(idx);
+ if (CE_BAD(target))
+ return;
+ Vector angle = NET_VECTOR(RAW_ENT(LOCAL_E), netvar.m_angEyeAngles);
+ Vector tarAngle = NET_VECTOR(RAW_ENT(target), netvar.m_angEyeAngles);
+ Vector wsc_spy_to_victim = GetWorldSpaceCenter(target) - GetWorldSpaceCenter(LOCAL_E);
+ wsc_spy_to_victim.z = 0;
+ wsc_spy_to_victim.NormalizeInPlace();
+
+ Vector eye_spy = angle;
+ eye_spy.z = 0;
+ eye_spy.NormalizeInPlace();
+
+ Vector eye_victim = tarAngle;
+ eye_victim.z = 0;
+ eye_victim.NormalizeInPlace();
+
+ float dot1 = DotProduct(wsc_spy_to_victim, eye_victim);
+ float dot2 = DotProduct(wsc_spy_to_victim, eye_spy);
+ float dot3 = DotProduct(eye_spy, eye_victim);
+ bool IsBehind = dot1 <= 0.0f;
+ bool LookingAtVic = dot2 <= 0.5f;
+ bool InBackstabAngleRange = dot3 <= -0.3f;
+ rgba_t col1 = IsBehind ? colors::red : colors::green;
+ rgba_t col2 = LookingAtVic ? colors::red : colors::green;
+ rgba_t col3 = InBackstabAngleRange ? colors::red : colors::green;
+ AddCenterString(format("Behind target: ", dot1), col1);
+ AddCenterString(format("Looking at Target: ", dot2), col2);
+ AddCenterString(format("In Angle Range: ", dot3), col3);
+}
} // namespace hacks::tf2::autobackstab
diff --git a/src/hacks/AutoJoin.cpp b/src/hacks/AutoJoin.cpp
index de6829ef..723e782f 100644
--- a/src/hacks/AutoJoin.cpp
+++ b/src/hacks/AutoJoin.cpp
@@ -14,6 +14,7 @@
static settings::Bool autojoin_team{ "autojoin.team", "false" };
static settings::Int autojoin_class{ "autojoin.class", "0" };
static settings::Bool auto_queue{ "autojoin.auto-queue", "false" };
+static settings::Bool party_bypass{ "autojoin.party-bypass", "false" };
namespace hacks::shared::autojoin
{
@@ -42,7 +43,8 @@ static Timer req_timer{};
void updateSearch()
{
// segfaults for no reason
- /*static bool calld = false;
+ static bool calld = false;
+ /*
if (party_bypass && !calld)
{
static unsigned char patch[] = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 };
@@ -97,6 +99,7 @@ void updateSearch()
typedef int (*GetPendingInvites_t)(uintptr_t);
GetPendingInvites_t GetPendingInvites = GetPendingInvites_t(offset1);
int invites = GetPendingInvites(offset0);
+
re::CTFGCClientSystem *gc = re::CTFGCClientSystem::GTFGCClientSystem();
re::CTFPartyClient *pc = re::CTFPartyClient::GTFPartyClient();
if (current_user_cmd && gc && gc->BConnectedToMatchServer(false) &&
diff --git a/src/hacks/Backtrack.cpp b/src/hacks/Backtrack.cpp
index 3621bc1c..5cfadce7 100644
--- a/src/hacks/Backtrack.cpp
+++ b/src/hacks/Backtrack.cpp
@@ -261,25 +261,13 @@ bool ValidTick(BacktrackData &i, CachedEntity *ent)
return true;
if (istickinvalid[ent->m_IDX][i.index])
return false;
- if (hacks::shared::aimbot::IsBacktracking())
- {
- if (IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center,
- true))
- if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) *
- 1000.0f -
- getLatency() - i.simtime * 1000.0f) <= 200.0f)
- {
- istickvalid[ent->m_IDX][i.index] = true;
- return true;
- }
- }
- else if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) *
- 1000.0f -
- getLatency() - i.simtime * 1000.0f) <= 200.0f)
- {
- istickvalid[ent->m_IDX][i.index] = true;
- return true;
- }
+ if (IsVectorVisible(g_pLocalPlayer->v_Eye, i.hitboxes[head].center, true))
+ if (fabsf(NET_FLOAT(RAW_ENT(ent), netvar.m_flSimulationTime) * 1000.0f -
+ getLatency() - i.simtime * 1000.0f) <= 200.0f)
+ {
+ istickvalid[ent->m_IDX][i.index] = true;
+ return true;
+ }
istickinvalid[ent->m_IDX][i.index] = true;
return false;
}
diff --git a/src/hacks/NavBot.cpp b/src/hacks/NavBot.cpp
index 1d3fd479..d41afa21 100644
--- a/src/hacks/NavBot.cpp
+++ b/src/hacks/NavBot.cpp
@@ -492,14 +492,25 @@ void CreateMove()
}
else
{
+ int bestscr = INT_MAX;
+ hacks::shared::backtrack::BacktrackData besttick{};
for (auto i : hacks::shared::backtrack::headPositions
[tar->m_IDX])
{
if (!hacks::shared::backtrack::ValidTick(i, tar))
- continue;
- nav::NavTo(i.entorigin, false, false);
- break;
+ {
+ int scr = i.tickcount;
+ if (scr < bestscr)
+ {
+ bestscr = scr;
+ besttick = i;
+ }
+ }
}
+ if (besttick.tickcount)
+ nav::NavTo(besttick.entorigin, false, false);
+ else if (!nav::NavTo(tar->m_vecOrigin(), false))
+ last_tar = -1;
}
}
}
diff --git a/src/hacks/Trigger.cpp b/src/hacks/Trigger.cpp
index be9bfe3e..da4a194a 100644
--- a/src/hacks/Trigger.cpp
+++ b/src/hacks/Trigger.cpp
@@ -49,7 +49,7 @@ bool CanBacktrack()
? ENTITY(hacks::shared::backtrack::iBestTarget)
: nullptr;
if (CE_BAD(tar))
- return false;
+ return true;
for (auto i : hacks::shared::backtrack::headPositions[tar->m_IDX])
{
if (!hacks::shared::backtrack::ValidTick(i, tar))
@@ -88,10 +88,10 @@ bool CanBacktrack()
angles.y = i.viewangles;
current_user_cmd->tick_count = i.tickcount;
current_user_cmd->buttons |= IN_ATTACK;
- return false;
+ return true;
}
}
- return true;
+ return false;
}
// The main "loop" of the triggerbot
void CreateMove()
@@ -116,7 +116,7 @@ void CreateMove()
// Check if can backtrack, shoot if we can
if (hacks::shared::backtrack::isBacktrackEnabled)
- if (!CanBacktrack())
+ if (CanBacktrack())
return;
// Check if dormant or null to prevent crashes
@@ -442,7 +442,7 @@ bool HeadPreferable(CachedEntity *target)
{
// Switch based on the priority type we need
- switch ((int) hitbox_mode)
+ switch (*hitbox_mode)
{
case 0:
{ // AUTO-HEAD priority
@@ -558,25 +558,19 @@ bool UpdateAimkey()
// Only while key is depressed, enable
case 1:
if (!key_down)
- {
allow_trigger_key = false;
- }
break;
// Only while key is not depressed, enable
case 2:
if (key_down)
- {
allow_trigger_key = false;
- }
break;
// Aimkey acts like a toggle switch
case 3:
if (!pressed_last_tick && key_down)
trigger_key_flip = !trigger_key_flip;
if (!trigger_key_flip)
- {
allow_trigger_key = false;
- }
}
pressed_last_tick = key_down;
}
diff --git a/src/helpers.cpp b/src/helpers.cpp
index 63a9bf4b..3be70926 100644
--- a/src/helpers.cpp
+++ b/src/helpers.cpp
@@ -1155,13 +1155,10 @@ void WhatIAmLookingAt(int *result_eindex, Vector *result_pos)
if (result_pos)
*result_pos = trace.endpos;
if (result_eindex)
- {
- *result_eindex = 0;
- }
+ *result_eindex = -1;
if (trace.m_pEnt && result_eindex)
- {
*result_eindex = ((IClientEntity *) (trace.m_pEnt))->entindex();
- }
+
}
bool IsSentryBuster(CachedEntity *entity)
diff --git a/src/visual/drawmgr.cpp b/src/visual/drawmgr.cpp
index 564c2dc1..f5337bcc 100644
--- a/src/visual/drawmgr.cpp
+++ b/src/visual/drawmgr.cpp
@@ -168,6 +168,7 @@ void DrawCheatVisuals()
{
criticals::draw();
}
+ hacks::tf2::autobackstab::Draw();
#ifndef FEATURE_FIDGET_SPINNER_ENABLED
DrawSpinner();
#endif
diff --git a/src/visual/menu/GuiInterface.cpp b/src/visual/menu/GuiInterface.cpp
index 2cc1e177..56f1be2d 100755
--- a/src/visual/menu/GuiInterface.cpp
+++ b/src/visual/menu/GuiInterface.cpp
@@ -94,7 +94,7 @@ static void initPlayerlist()
controller =
std::make_unique(*pl);
controller->setKickButtonCallback([](int uid) {
- hack::command_stack().push("callvote kick " + uid);
+ hack::command_stack().push(format("callvote kick ", uid));
});
controller->setOpenSteamCallback([](unsigned steam) {
CSteamID id{};