From 92b4b9a8454f34d5e67f05431a0d44dab0baa92d Mon Sep 17 00:00:00 2001
From: LightPower392 <21halo12@gmail.com>
Date: Wed, 22 Apr 2020 18:21:45 -0700
Subject: [PATCH 1/6] Bone Fix + More
---
src/hacks/Aimbot.cpp | 37 +++++++++++++++++++++++++++++++++++++
src/hacks/ESP.cpp | 43 ++++++++++++++++++++++++++++++-------------
src/hacks/Radar.cpp | 6 ++++++
3 files changed, 73 insertions(+), 13 deletions(-)
diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp
index aea03000..88f2daf7 100644
--- a/src/hacks/Aimbot.cpp
+++ b/src/hacks/Aimbot.cpp
@@ -40,6 +40,7 @@ static settings::Boolean wait_for_charge{ "aimbot.wait-for-charge", "0" };
static settings::Boolean silent{ "aimbot.silent", "1" };
static settings::Boolean target_lock{ "aimbot.lock-target", "0" };
+static settings::Boolean assistance_only{ "aimbot.assistance.only", "0" };
static settings::Int hitbox{ "aimbot.hitbox", "0" };
static settings::Boolean zoomed_only{ "aimbot.zoomed-only", "1" };
static settings::Boolean only_can_shoot{ "aimbot.can-shoot-only", "1" };
@@ -81,6 +82,12 @@ static settings::Boolean fov_draw{ "aimbot.fov-circle.enable", "0" };
static settings::Float fovcircle_opacity{ "aimbot.fov-circle.opacity", "0.7" };
#endif
+int PreviousX, PreviousY;
+int CurrentX, CurrentY;
+
+float last_mouse_check = 0;
+float stop_moving_time = 0;
+
int GetSentry()
{
for (int i = 1; i <= HIGHEST_ENTITY; i++)
@@ -325,6 +332,33 @@ static void CreateMove()
}
}
+bool MouseMoving()
+{
+ if ((g_GlobalVars->curtime - last_mouse_check) < 0.02)
+ {
+ auto previous = SDL_GetMouseState(&PreviousX, &PreviousY);
+ }
+ else
+ {
+ auto current = SDL_GetMouseState(&CurrentX, &CurrentY);
+ last_mouse_check = g_GlobalVars->curtime;
+ }
+
+ if (PreviousX != CurrentX || PreviousY != CurrentY)
+ {
+ stop_moving_time = g_GlobalVars->curtime + 0.5;
+ return true;
+ }
+ else if (g_GlobalVars->curtime <= stop_moving_time)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+}
+
// The first check to see if the player should aim in the first place
bool ShouldAim()
{
@@ -356,6 +390,9 @@ bool ShouldAim()
return false;
}
+ if (assistance_only && !MouseMoving())
+ return false;
+
IF_GAME(IsTF2())
{
switch (GetWeaponMode())
diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp
index 2a207028..cd29ffaa 100644
--- a/src/hacks/ESP.cpp
+++ b/src/hacks/ESP.cpp
@@ -30,6 +30,7 @@ static settings::Int emoji_min_size{ "esp.emoji.min-size", "20" };
static settings::Int healthbar{ "esp.health-bar", "3" };
static settings::Boolean draw_bones{ "esp.bones", "false" };
+static settings::Boolean bones_color{ "esp.bones.color", "false" };
static settings::Int sightlines{ "esp.sightlines", "0" };
static settings::Int esp_text_position{ "esp.text-position", "0" };
static settings::Int esp_expand{ "esp.expand", "0" };
@@ -150,7 +151,7 @@ struct bonelist_s
setup = true;
}
- void DrawBoneList(const matrix3x4_t *bones, int *in, int size, const rgba_t &color, const Vector &displacement)
+ void _FASTCALL DrawBoneList(const matrix3x4_t *bones, int *in, int size, const rgba_t &color)
{
Vector last_screen;
Vector current_screen;
@@ -158,7 +159,6 @@ struct bonelist_s
{
const auto &bone = bones[in[i]];
Vector position(bone[0][3], bone[1][3], bone[2][3]);
- position += displacement;
if (!draw::WorldToScreen(position, current_screen))
{
return;
@@ -171,9 +171,9 @@ struct bonelist_s
}
}
- void Draw(CachedEntity *ent, const rgba_t &color)
+ void _FASTCALL Draw(CachedEntity *enti, const rgba_t &color)
{
- const model_t *model = RAW_ENT(ent)->GetModel();
+ const model_t *model = RAW_ENT(enti)->GetModel();
if (not model)
{
return;
@@ -189,15 +189,14 @@ struct bonelist_s
return;
// ent->m_bBonesSetup = false;
- Vector displacement = {};
- const auto &bones = ent->hitboxes.GetBones();
- DrawBoneList(bones, leg_r, 3, color, displacement);
- DrawBoneList(bones, leg_l, 3, color, displacement);
- DrawBoneList(bones, bottom, 3, color, displacement);
- DrawBoneList(bones, spine, 7, color, displacement);
- DrawBoneList(bones, arm_r, 3, color, displacement);
- DrawBoneList(bones, arm_l, 3, color, displacement);
- DrawBoneList(bones, up, 3, color, displacement);
+ const auto &bones = enti->hitboxes.GetBones();
+ DrawBoneList(bones, leg_r, 3, color);
+ DrawBoneList(bones, leg_l, 3, color);
+ DrawBoneList(bones, bottom, 3, color);
+ DrawBoneList(bones, spine, 7, color);
+ DrawBoneList(bones, arm_r, 3, color);
+ DrawBoneList(bones, arm_l, 3, color);
+ DrawBoneList(bones, up, 3, color);
/*for (int i = 0; i < hdr->numbones; i++) {
const auto& bone = ent->GetBones()[i];
Vector pos(bone[0][3], bone[1][3], bone[2][3]);
@@ -626,6 +625,24 @@ void _FASTCALL ProcessEntityPT(CachedEntity *ent)
}
}
+ if (draw_bones)
+ {
+ if (vischeck && !ent->IsVisible())
+ transparent = true;
+ rgba_t bone_color = colors::EntityF(ent);
+ if (transparent)
+ bone_color = colors::Transparent(bone_color);
+
+ bonelist_s bl;
+ if (!CE_INVALID(ent) && ent->m_bAlivePlayer() && !RAW_ENT(ent)->IsDormant() && LOCAL_E->m_bAlivePlayer())
+ {
+ if (bones_color)
+ bl.Draw(ent, bone_color);
+ else
+ bl.Draw(ent, colors::white);
+ }
+ }
+
// Top horizontal health bar
if (*healthbar == 1)
{
diff --git a/src/hacks/Radar.cpp b/src/hacks/Radar.cpp
index faf69de4..1a1c523f 100644
--- a/src/hacks/Radar.cpp
+++ b/src/hacks/Radar.cpp
@@ -24,7 +24,9 @@ static settings::Int icon_size{ "radar.icon-size", "20" };
static settings::Int radar_x{ "radar.x", "100" };
static settings::Int radar_y{ "radar.y", "100" };
static settings::Boolean use_icons{ "radar.use-icons", "true" };
+static settings::Boolean show_self{ "radar.show.self", "true" };
static settings::Boolean show_teammates{ "radar.show.teammates", "true" };
+static settings::Boolean show_teambuildings{ "radar.show.team.buildings", "true" };
static settings::Boolean show_healthpacks{ "radar.show.health", "true" };
static settings::Boolean show_ammopacks{ "radar.show.ammo", "true" };
@@ -248,6 +250,10 @@ void Draw()
continue;
if (!show_teammates && ent->m_Type() == ENTITY_PLAYER && !ent->m_bEnemy())
continue;
+ if (!show_teambuildings && ent->m_Type() == ENTITY_BUILDING && !ent->m_bEnemy())
+ continue;
+ if (!show_self && ent->m_IDX == LOCAL_E->m_IDX)
+ continue;
if (ent->m_iClassID() == CL_CLASS(CObjectSentrygun))
sentries.push_back(ent);
else if (!enemies_over_teammates || !show_teammates || ent->m_Type() != ENTITY_PLAYER)
From e810b3732ed9d2866942ed21ccbeb4ab0e1cbb27 Mon Sep 17 00:00:00 2001
From: LightPower392 <60998601+LightPower392@users.noreply.github.com>
Date: Wed, 22 Apr 2020 18:31:23 -0700
Subject: [PATCH 2/6] Team Building Option
---
src/hacks/Radar.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/hacks/Radar.cpp b/src/hacks/Radar.cpp
index 1a1c523f..0ba2f89e 100644
--- a/src/hacks/Radar.cpp
+++ b/src/hacks/Radar.cpp
@@ -24,7 +24,6 @@ static settings::Int icon_size{ "radar.icon-size", "20" };
static settings::Int radar_x{ "radar.x", "100" };
static settings::Int radar_y{ "radar.y", "100" };
static settings::Boolean use_icons{ "radar.use-icons", "true" };
-static settings::Boolean show_self{ "radar.show.self", "true" };
static settings::Boolean show_teammates{ "radar.show.teammates", "true" };
static settings::Boolean show_teambuildings{ "radar.show.team.buildings", "true" };
static settings::Boolean show_healthpacks{ "radar.show.health", "true" };
@@ -252,8 +251,6 @@ void Draw()
continue;
if (!show_teambuildings && ent->m_Type() == ENTITY_BUILDING && !ent->m_bEnemy())
continue;
- if (!show_self && ent->m_IDX == LOCAL_E->m_IDX)
- continue;
if (ent->m_iClassID() == CL_CLASS(CObjectSentrygun))
sentries.push_back(ent);
else if (!enemies_over_teammates || !show_teammates || ent->m_Type() != ENTITY_PLAYER)
From 1a4929eda7222100b747b94b8d03e2d68505c57f Mon Sep 17 00:00:00 2001
From: LightPower392 <60998601+LightPower392@users.noreply.github.com>
Date: Wed, 22 Apr 2020 18:33:55 -0700
Subject: [PATCH 3/6] Updated data file
---
data/menu/nullifiedcat/aimbot.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/data/menu/nullifiedcat/aimbot.xml b/data/menu/nullifiedcat/aimbot.xml
index eb36b243..d500c80f 100755
--- a/data/menu/nullifiedcat/aimbot.xml
+++ b/data/menu/nullifiedcat/aimbot.xml
@@ -83,6 +83,7 @@
+
@@ -123,7 +124,7 @@
-
+
From 1a62e7680e48c7bc81b3ac321e6cf1cf0e42b625 Mon Sep 17 00:00:00 2001
From: LightPower392 <60998601+LightPower392@users.noreply.github.com>
Date: Wed, 22 Apr 2020 18:34:42 -0700
Subject: [PATCH 4/6] added data file changes
---
data/menu/nullifiedcat/visuals/esp.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/menu/nullifiedcat/visuals/esp.xml b/data/menu/nullifiedcat/visuals/esp.xml
index fed6fd4e..17e9ef68 100755
--- a/data/menu/nullifiedcat/visuals/esp.xml
+++ b/data/menu/nullifiedcat/visuals/esp.xml
@@ -65,6 +65,7 @@
+
From 280333c5cf9aff82698271abdf6a21abd4b4d6da Mon Sep 17 00:00:00 2001
From: LightPower392 <60998601+LightPower392@users.noreply.github.com>
Date: Wed, 22 Apr 2020 18:35:35 -0700
Subject: [PATCH 5/6] Updated data file
---
data/menu/nullifiedcat/visuals/radar.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/menu/nullifiedcat/visuals/radar.xml b/data/menu/nullifiedcat/visuals/radar.xml
index 9d8eb9fd..636e1682 100755
--- a/data/menu/nullifiedcat/visuals/radar.xml
+++ b/data/menu/nullifiedcat/visuals/radar.xml
@@ -25,6 +25,7 @@
+
From 3fd4f5aa039f82cde41c0831a38d07bada84390f Mon Sep 17 00:00:00 2001
From: LightPower392 <60998601+LightPower392@users.noreply.github.com>
Date: Thu, 30 Apr 2020 08:46:59 -0700
Subject: [PATCH 6/6] changed enti to ent
---
src/hacks/ESP.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp
index cd29ffaa..fcae75b2 100644
--- a/src/hacks/ESP.cpp
+++ b/src/hacks/ESP.cpp
@@ -171,9 +171,9 @@ struct bonelist_s
}
}
- void _FASTCALL Draw(CachedEntity *enti, const rgba_t &color)
+ void _FASTCALL Draw(CachedEntity *ent, const rgba_t &color)
{
- const model_t *model = RAW_ENT(enti)->GetModel();
+ const model_t *model = RAW_ENT(ent)->GetModel();
if (not model)
{
return;
@@ -189,7 +189,7 @@ struct bonelist_s
return;
// ent->m_bBonesSetup = false;
- const auto &bones = enti->hitboxes.GetBones();
+ const auto &bones = ent->hitboxes.GetBones();
DrawBoneList(bones, leg_r, 3, color);
DrawBoneList(bones, leg_l, 3, color);
DrawBoneList(bones, bottom, 3, color);