From 03c7224ce027d8be4db3b5a0db1d757f81cdb2b1 Mon Sep 17 00:00:00 2001 From: skillbot Date: Thu, 20 Apr 2017 12:05:47 -0400 Subject: [PATCH 1/8] Added closest bone functionality --- src/ATGUI/Tabs/aimbottab.cpp | 7 ++++++- src/Hacks/aimbot.cpp | 33 +++++++++++++++++++++++++++++---- src/settings.cpp | 4 +++- src/settings.h | 7 +++++-- 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/src/ATGUI/Tabs/aimbottab.cpp b/src/ATGUI/Tabs/aimbottab.cpp index 65c52c993..434ea2d25 100644 --- a/src/ATGUI/Tabs/aimbottab.cpp +++ b/src/ATGUI/Tabs/aimbottab.cpp @@ -4,6 +4,7 @@ static ItemDefinitionIndex currentWeapon = ItemDefinitionIndex::INVALID; static bool enabled = false; static bool silent = false; static bool friendly = false; +static bool closestBone = false; static Bone bone = Bone::BONE_HEAD; static ButtonCode_t aimkey = ButtonCode_t::MOUSE_MIDDLE; static bool aimkeyOnly = false; @@ -46,6 +47,7 @@ void UI::ReloadWeaponSettings() enabled = Settings::Aimbot::weapons.at(index).enabled; silent = Settings::Aimbot::weapons.at(index).silent; friendly = Settings::Aimbot::weapons.at(index).friendly; + closestBone = Settings::Aimbot::weapons.at(index).closestBone; bone = Settings::Aimbot::weapons.at(index).bone; aimkey = Settings::Aimbot::weapons.at(index).aimkey; aimkeyOnly = Settings::Aimbot::weapons.at(index).aimkeyOnly; @@ -88,7 +90,7 @@ void UI::UpdateWeaponSettings() Settings::Aimbot::weapons[currentWeapon] = AimbotWeapon_t(); AimbotWeapon_t settings = { - enabled, silent, friendly, bone, aimkey, aimkeyOnly, + enabled, silent, friendly, closestBone, bone, aimkey, aimkeyOnly, smoothEnabled, smoothValue, smoothType, smoothSaltEnabled, smoothSaltMultiplier, errorMarginEnabled, errorMarginValue, autoAimEnabled, autoAimValue, aimStepEnabled, aimStepValue, @@ -160,6 +162,9 @@ void Aimbot::RenderTab() { ImGui::Text("Target"); ImGui::Separator(); + if (ImGui::Checkbox("Closest Bone", &closestBone)) + UI::UpdateWeaponSettings(); + SetTooltip("Aims at the bone closest to your crosshair"); ImGui::Columns(2, NULL, true); { if (ImGui::Checkbox("Friendly", &friendly)) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index c9df60a83..5405acddc 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -7,6 +7,7 @@ bool Settings::Aimbot::enabled = false; bool Settings::Aimbot::silent = false; bool Settings::Aimbot::friendly = false; +bool Settings::Aimbot::closestBone = false; Bone Settings::Aimbot::bone = Bone::BONE_HEAD; ButtonCode_t Settings::Aimbot::aimkey = ButtonCode_t::MOUSE_MIDDLE; bool Settings::Aimbot::aimkeyOnly = false; @@ -58,7 +59,7 @@ std::unordered_map, Util::IntHash> hitb }; std::unordered_map> Settings::Aimbot::weapons = { - { ItemDefinitionIndex::INVALID, { false, false, false, Bone::BONE_HEAD, ButtonCode_t::MOUSE_MIDDLE, false, false, 1.0f, SmoothType::SLOW_END, false, 0.0f, false, 0.0f, true, 180.0f, false, 25.0f, false, false, 2.0f, 2.0f, false, false, false, false, false, false, false, false, 10.0f, false, false, false, 5.0f } }, + { ItemDefinitionIndex::INVALID, { false, false, false, false, Bone::BONE_HEAD, ButtonCode_t::MOUSE_MIDDLE, false, false, 1.0f, SmoothType::SLOW_END, false, 0.0f, false, 0.0f, true, 180.0f, false, 25.0f, false, false, 2.0f, 2.0f, false, false, false, false, false, false, false, false, 10.0f, false, false, false, 5.0f } }, }; static const char* targets[] = { "pelvis", "", "", "spine_0", "spine_1", "spine_2", "spine_3", "neck_0", "head_0" }; @@ -172,7 +173,8 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa if (std::find(Aimbot::friends.begin(), Aimbot::friends.end(), entityInformation.xuid) != Aimbot::friends.end()) continue; - Vector eVecTarget = player->GetBonePosition((int) Settings::Aimbot::bone); + Bone targetBone = Settings::Aimbot::bone; + Vector eVecTarget = player->GetBonePosition((int) targetBone); Vector pVecTarget = localplayer->GetEyePosition(); QAngle viewAngles; @@ -182,6 +184,29 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa float fov = Math::GetFov(viewAngles, Math::CalcAngle(pVecTarget, eVecTarget)); float real_distance = GetRealDistanceFOV(distance, Math::CalcAngle(pVecTarget, eVecTarget), cmd); int hp = player->GetHealth(); + + if (Settings::Aimbot::closestBone) + { + for (int i = (int)Bone::BONE_PELVIS; i < (int)Bone::BONE_HEAD; i++) + { + if (i == 1 || i == 2) + continue; + + Bone testBone = static_cast(i); + Vector mVecTarget = player->GetBonePosition((int) testBone); + float m_distance = pVecTarget.DistTo(mVecTarget); + float m_fov = Math::GetFov(viewAngles, Math::CalcAngle(pVecTarget, mVecTarget)); + float m_real_distance = GetRealDistanceFOV(m_distance, Math::CalcAngle(pVecTarget, mVecTarget), cmd); + + if (m_real_distance < real_distance) + { + distance = m_distance; + fov = m_fov; + real_distance = m_real_distance; + targetBone = testBone; + } + } + } if (aimTargetType == AimTargetType::DISTANCE && distance > bestDistance) continue; @@ -195,10 +220,10 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa if (aimTargetType == AimTargetType::HP && hp > bestHp) continue; - if (visible && !Settings::Aimbot::AutoWall::enabled && !Entity::IsVisible(player, Settings::Aimbot::bone)) + if (visible && !Settings::Aimbot::AutoWall::enabled && !Entity::IsVisible(player, targetBone)) continue; - bestBone = static_cast(Entity::GetBoneByName(player, targets[(int) Settings::Aimbot::bone])); + bestBone = static_cast(Entity::GetBoneByName(player, targets[(int) targetBone])); if (Settings::Aimbot::AutoWall::enabled) { diff --git a/src/settings.cpp b/src/settings.cpp index 4db598938..1da809b63 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -148,6 +148,7 @@ void Settings::LoadDefaultsOrSave(std::string path) weaponSetting["Enabled"] = i.second.enabled; weaponSetting["Silent"] = i.second.silent; weaponSetting["Friendly"] = i.second.friendly; + weaponSetting["ClosestBone"] = i.second.closestBone; weaponSetting["TargetBone"] = (int) i.second.bone; weaponSetting["AimKey"] = Util::GetButtonName(i.second.aimkey); weaponSetting["AimKeyOnly"] = i.second.aimkeyOnly; @@ -507,7 +508,7 @@ void Settings::LoadConfig(std::string path) Fonts::SetupFonts(); Settings::Aimbot::weapons = { - { ItemDefinitionIndex::INVALID, { false, false, false, Bone::BONE_HEAD, ButtonCode_t::MOUSE_MIDDLE, false, false, 1.0f, SmoothType::SLOW_END, false, 0.0f, false, 0.0f, true, 180.0f, false, 25.0f, false, false, 2.0f, 2.0f, false, false, false, false, false, false, false, false, 10.0f, false, false, false, 5.0f } }, + { ItemDefinitionIndex::INVALID, { false, false, false, false, Bone::BONE_HEAD, ButtonCode_t::MOUSE_MIDDLE, false, false, 1.0f, SmoothType::SLOW_END, false, 0.0f, false, 0.0f, true, 180.0f, false, 25.0f, false, false, 2.0f, 2.0f, false, false, false, false, false, false, false, false, 10.0f, false, false, false, 5.0f } }, }; for (Json::ValueIterator itr = settings["Aimbot"]["weapons"].begin(); itr != settings["Aimbot"]["weapons"].end(); itr++) @@ -534,6 +535,7 @@ void Settings::LoadConfig(std::string path) weaponSetting["Enabled"].asBool(), weaponSetting["Silent"].asBool(), weaponSetting["Friendly"].asBool(), + weaponSetting["ClosestBone"].asBool(), (Bone) weaponSetting["TargetBone"].asInt(), Util::GetButtonCode(weaponSetting["AimKey"].asCString()), weaponSetting["AimKeyOnly"].asBool(), diff --git a/src/settings.h b/src/settings.h index fbc06d98f..c170165e0 100644 --- a/src/settings.h +++ b/src/settings.h @@ -144,7 +144,7 @@ enum class SpammerType : int struct AimbotWeapon_t { - bool enabled, silent, friendly; + bool enabled, silent, friendly, closestBone; Bone bone; SmoothType smoothType; ButtonCode_t aimkey; @@ -152,7 +152,7 @@ struct AimbotWeapon_t float smoothAmount, smoothSaltMultiplier, errorMarginValue, autoAimFov, aimStepValue, rcsAmountX, rcsAmountY, autoWallValue, autoSlowMinDamage; bool autoPistolEnabled, autoShootEnabled, autoScopeEnabled, noShootEnabled, ignoreJumpEnabled, smokeCheck, flashCheck, autoWallEnabled, autoWallBones[6], autoAimRealDistance, autoSlow, predEnabled; - AimbotWeapon_t(bool enabled, bool silent, bool friendly, Bone bone, ButtonCode_t aimkey, bool aimkeyOnly, + AimbotWeapon_t(bool enabled, bool silent, bool friendly, bool closestBone, Bone bone, ButtonCode_t aimkey, bool aimkeyOnly, bool smoothEnabled, float smoothValue, SmoothType smoothType, bool smoothSaltEnabled, float smoothSaltMultiplier, bool errorMarginEnabled, float errorMarginValue, bool autoAimEnabled, float autoAimValue, bool aimStepEnabled, float aimStepValue, @@ -165,6 +165,7 @@ struct AimbotWeapon_t this->enabled = enabled; this->silent = silent; this->friendly = friendly; + this->closestBone = closestBone; this->bone = bone; this->aimkey = aimkey; this->aimkeyOnly = aimkeyOnly; @@ -215,6 +216,7 @@ struct AimbotWeapon_t return this->enabled == another.enabled && this->silent == another.silent && this->friendly == another.friendly && + this->closestBone == another.closestBone && this->bone == another.bone && this->aimkey == another.aimkey && this->aimkeyOnly == another.aimkeyOnly && @@ -318,6 +320,7 @@ namespace Settings extern bool enabled; extern bool silent; extern bool friendly; + extern bool closestBone; extern Bone bone; extern ButtonCode_t aimkey; extern bool aimkeyOnly; From 17a815f21969250dfa36cca555ef43731d309a61 Mon Sep 17 00:00:00 2001 From: skillbot Date: Thu, 20 Apr 2017 22:27:28 -0400 Subject: [PATCH 2/8] Shits broken --- src/Hacks/aimbot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index 5405acddc..4e3918059 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -186,12 +186,12 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa int hp = player->GetHealth(); if (Settings::Aimbot::closestBone) - { - for (int i = (int)Bone::BONE_PELVIS; i < (int)Bone::BONE_HEAD; i++) + { + for (int i = (int) Bone::BONE_PELVIS; i <= (int) Bone::BONE_HEAD; i++) { - if (i == 1 || i == 2) + if (i == (int) Bone::CAM_DRIVER || i == (int) Bone::LEAN_ROOT || i == (int) Bone::INVALID) continue; - + Bone testBone = static_cast(i); Vector mVecTarget = player->GetBonePosition((int) testBone); float m_distance = pVecTarget.DistTo(mVecTarget); From 699db0565f189a8df564b86ee49ad4279f931427 Mon Sep 17 00:00:00 2001 From: skillbot Date: Fri, 21 Apr 2017 10:39:26 -0400 Subject: [PATCH 3/8] Closest bone working --- src/Hacks/aimbot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index 4e3918059..cb477369a 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -185,7 +185,7 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa float real_distance = GetRealDistanceFOV(distance, Math::CalcAngle(pVecTarget, eVecTarget), cmd); int hp = player->GetHealth(); - if (Settings::Aimbot::closestBone) + if (Settings::Aimbot::bone == Bone::BONE_PELVIS) { for (int i = (int) Bone::BONE_PELVIS; i <= (int) Bone::BONE_HEAD; i++) { @@ -641,6 +641,7 @@ void Aimbot::UpdateValues() Settings::Aimbot::enabled = currentWeaponSetting.enabled; Settings::Aimbot::silent = currentWeaponSetting.silent; Settings::Aimbot::friendly = currentWeaponSetting.friendly; + Settings::Aimbot::closestBone = currentWeaponSetting.closestBone; Settings::Aimbot::bone = currentWeaponSetting.bone; Settings::Aimbot::aimkey = currentWeaponSetting.aimkey; Settings::Aimbot::aimkeyOnly = currentWeaponSetting.aimkeyOnly; From e5ce759eaecb35140ddee37ceed5352c7d1ab5c6 Mon Sep 17 00:00:00 2001 From: skillbot Date: Fri, 21 Apr 2017 10:43:51 -0400 Subject: [PATCH 4/8] Final commit --- src/Hacks/aimbot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index cb477369a..72bc5a738 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -185,7 +185,7 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa float real_distance = GetRealDistanceFOV(distance, Math::CalcAngle(pVecTarget, eVecTarget), cmd); int hp = player->GetHealth(); - if (Settings::Aimbot::bone == Bone::BONE_PELVIS) + if (Settings::Aimbot::closestBone) { for (int i = (int) Bone::BONE_PELVIS; i <= (int) Bone::BONE_HEAD; i++) { From 3275916182faf650e3e7584fd00bcde7f6e496e8 Mon Sep 17 00:00:00 2001 From: skillbot Date: Fri, 21 Apr 2017 10:43:51 -0400 Subject: [PATCH 5/8] Final commit --- src/Hacks/aimbot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index 72bc5a738..b951c1260 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -187,7 +187,7 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa if (Settings::Aimbot::closestBone) { - for (int i = (int) Bone::BONE_PELVIS; i <= (int) Bone::BONE_HEAD; i++) + for (int i = (int) Bone::BONE_PELVIS; i < (int) Bone::BONE_HEAD; i++) { if (i == (int) Bone::CAM_DRIVER || i == (int) Bone::LEAN_ROOT || i == (int) Bone::INVALID) continue; From f70a5e4d5adb41029cc3d3c9dd5f345cd5865254 Mon Sep 17 00:00:00 2001 From: skillbot Date: Fri, 21 Apr 2017 17:06:42 -0400 Subject: [PATCH 6/8] Fixed formatting --- src/ATGUI/Tabs/aimbottab.cpp | 2 +- src/Hacks/aimbot.cpp | 34 +++++++++++++++++----------------- src/settings.h | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/ATGUI/Tabs/aimbottab.cpp b/src/ATGUI/Tabs/aimbottab.cpp index 434ea2d25..f1af4d94f 100644 --- a/src/ATGUI/Tabs/aimbottab.cpp +++ b/src/ATGUI/Tabs/aimbottab.cpp @@ -163,7 +163,7 @@ void Aimbot::RenderTab() ImGui::Text("Target"); ImGui::Separator(); if (ImGui::Checkbox("Closest Bone", &closestBone)) - UI::UpdateWeaponSettings(); + UI::UpdateWeaponSettings(); SetTooltip("Aims at the bone closest to your crosshair"); ImGui::Columns(2, NULL, true); { diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index b951c1260..d6adc5779 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -187,25 +187,25 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa if (Settings::Aimbot::closestBone) { - for (int i = (int) Bone::BONE_PELVIS; i < (int) Bone::BONE_HEAD; i++) - { - if (i == (int) Bone::CAM_DRIVER || i == (int) Bone::LEAN_ROOT || i == (int) Bone::INVALID) - continue; - - Bone testBone = static_cast(i); - Vector mVecTarget = player->GetBonePosition((int) testBone); - float m_distance = pVecTarget.DistTo(mVecTarget); - float m_fov = Math::GetFov(viewAngles, Math::CalcAngle(pVecTarget, mVecTarget)); - float m_real_distance = GetRealDistanceFOV(m_distance, Math::CalcAngle(pVecTarget, mVecTarget), cmd); - - if (m_real_distance < real_distance) + for (int i = (int) Bone::BONE_PELVIS; i < (int) Bone::BONE_HEAD; i++) { - distance = m_distance; - fov = m_fov; - real_distance = m_real_distance; - targetBone = testBone; + if (i == (int) Bone::CAM_DRIVER || i == (int) Bone::LEAN_ROOT || i == (int) Bone::INVALID) + continue; + + Bone testBone = static_cast(i); + Vector mVecTarget = player->GetBonePosition((int) testBone); + float m_distance = pVecTarget.DistTo(mVecTarget); + float m_fov = Math::GetFov(viewAngles, Math::CalcAngle(pVecTarget, mVecTarget)); + float m_real_distance = GetRealDistanceFOV(m_distance, Math::CalcAngle(pVecTarget, mVecTarget), cmd); + + if (m_real_distance < real_distance) + { + distance = m_distance; + fov = m_fov; + real_distance = m_real_distance; + targetBone = testBone; + } } - } } if (aimTargetType == AimTargetType::DISTANCE && distance > bestDistance) diff --git a/src/settings.h b/src/settings.h index c170165e0..312f567f5 100644 --- a/src/settings.h +++ b/src/settings.h @@ -320,7 +320,7 @@ namespace Settings extern bool enabled; extern bool silent; extern bool friendly; - extern bool closestBone; + extern bool closestBone; extern Bone bone; extern ButtonCode_t aimkey; extern bool aimkeyOnly; From 9d824b857eb4c5c24d984b531180ceb92887d4dc Mon Sep 17 00:00:00 2001 From: skillbot Date: Fri, 28 Apr 2017 16:05:17 -0400 Subject: [PATCH 7/8] Dynamic spray fov, working on better hitscan --- src/Hacks/aimbot.cpp | 11 +++++++++++ src/SDK/vector.h | 8 ++++++++ src/Utils/math.cpp | 8 ++++++++ src/Utils/math.h | 1 + 4 files changed, 28 insertions(+) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index d6adc5779..ff1936ac3 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -48,6 +48,7 @@ std::vector Aimbot::friends = { }; bool shouldAim; QAngle AimStepLastAngle; QAngle RCSLastPunch; +QAngle RealPunch; std::unordered_map, Util::IntHash> hitboxes = { { Hitbox::HITBOX_HEAD, { "head_0" } }, @@ -179,6 +180,16 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa QAngle viewAngles; engine->GetViewAngles(viewAngles); + + if (Settings::Aimbot::RCS::enabled && localplayer->GetShotsFired() > 1) + { + QAngle CurrentPunch = *localplayer->GetAimPunchAngle(); + QAngle ViewPunch = *localplayer->GetViewPunchAngle(); + QAngle NewPunch = { CurrentPunch.x + RealPunch.x + ViewPunch.x, CurrentPunch.y + RealPunch.y + ViewPunch.y, 0 }; + viewAngles.x += NewPunch.x; + viewAngles.y += NewPunch.y; + RealPunch = CurrentPunch; + } float distance = pVecTarget.DistTo(eVecTarget); float fov = Math::GetFov(viewAngles, Math::CalcAngle(pVecTarget, eVecTarget)); diff --git a/src/SDK/vector.h b/src/SDK/vector.h index 2a91d4e47..01194d23b 100644 --- a/src/SDK/vector.h +++ b/src/SDK/vector.h @@ -102,6 +102,7 @@ class Vector inline float DistTo(const Vector &vOther) const; inline float DistToSqr(const Vector &vOther) const; float Dot(const Vector& vOther) const; + float Dot(const float* fOther) const; float Length2D(void) const; float Length2DSqr(void) const; Vector& operator=(const Vector &vOther); @@ -427,6 +428,13 @@ inline float Vector::Dot(const Vector& vOther) const return(a.x*vOther.x + a.y*vOther.y + a.z*vOther.z); } +//================================================= +inline float Vector::Dot(const float* fOther) const +{ + const Vector& a = *this; + + return(a.x*fOther[0] + a.y*fOther[1] + a.z*fOther[2]); +} //----------------------------------------------------------------------------- // length diff --git a/src/Utils/math.cpp b/src/Utils/math.cpp index 0e8b31b1a..37be1713f 100644 --- a/src/Utils/math.cpp +++ b/src/Utils/math.cpp @@ -113,6 +113,14 @@ void Math::VectorAngles(const Vector& forward, QAngle &angles) angles[2] = 0.0f; } +void Math::VectorTransform( Vector& in1, matrix3x4_t& in2, Vector &out ) +{ + out.x = in1.Dot( in2.m_flMatVal[ 0 ] ) + in2.m_flMatVal[ 0 ][ 3 ]; + out.y = in1.Dot( in2.m_flMatVal[ 1 ] ) + in2.m_flMatVal[ 1 ][ 3 ]; + out.z = in1.Dot( in2.m_flMatVal[ 2 ] ) + in2.m_flMatVal[ 2 ][ 3 ]; +} + + QAngle Math::CalcAngle(Vector src, Vector dst) { QAngle angles; diff --git a/src/Utils/math.h b/src/Utils/math.h index e393b925b..67324e8c0 100644 --- a/src/Utils/math.h +++ b/src/Utils/math.h @@ -10,5 +10,6 @@ namespace Math { void CorrectMovement(QAngle vOldAngles, CUserCmd* pCmd, float fOldForward, float fOldSidemove); float GetFov(const QAngle &viewAngle, const QAngle &aimAngle); void VectorAngles(const Vector &forward, QAngle &angles); + void VectorTransform(Vector& in1, matrix3x4_t& in2, Vector &out); QAngle CalcAngle(Vector src, Vector dst); } \ No newline at end of file From 58d4aae10578de4dc78ca1e0ffa596644d911227 Mon Sep 17 00:00:00 2001 From: skillbot Date: Sun, 30 Apr 2017 15:38:22 -0400 Subject: [PATCH 8/8] Cleaned up master branch --- src/Hacks/aimbot.cpp | 11 ----------- src/SDK/vector.h | 8 -------- src/Utils/math.cpp | 8 -------- src/Utils/math.h | 1 - 4 files changed, 28 deletions(-) diff --git a/src/Hacks/aimbot.cpp b/src/Hacks/aimbot.cpp index ff1936ac3..d6adc5779 100644 --- a/src/Hacks/aimbot.cpp +++ b/src/Hacks/aimbot.cpp @@ -48,7 +48,6 @@ std::vector Aimbot::friends = { }; bool shouldAim; QAngle AimStepLastAngle; QAngle RCSLastPunch; -QAngle RealPunch; std::unordered_map, Util::IntHash> hitboxes = { { Hitbox::HITBOX_HEAD, { "head_0" } }, @@ -180,16 +179,6 @@ C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, bool visible, Bone& bestBone, floa QAngle viewAngles; engine->GetViewAngles(viewAngles); - - if (Settings::Aimbot::RCS::enabled && localplayer->GetShotsFired() > 1) - { - QAngle CurrentPunch = *localplayer->GetAimPunchAngle(); - QAngle ViewPunch = *localplayer->GetViewPunchAngle(); - QAngle NewPunch = { CurrentPunch.x + RealPunch.x + ViewPunch.x, CurrentPunch.y + RealPunch.y + ViewPunch.y, 0 }; - viewAngles.x += NewPunch.x; - viewAngles.y += NewPunch.y; - RealPunch = CurrentPunch; - } float distance = pVecTarget.DistTo(eVecTarget); float fov = Math::GetFov(viewAngles, Math::CalcAngle(pVecTarget, eVecTarget)); diff --git a/src/SDK/vector.h b/src/SDK/vector.h index 01194d23b..2a91d4e47 100644 --- a/src/SDK/vector.h +++ b/src/SDK/vector.h @@ -102,7 +102,6 @@ class Vector inline float DistTo(const Vector &vOther) const; inline float DistToSqr(const Vector &vOther) const; float Dot(const Vector& vOther) const; - float Dot(const float* fOther) const; float Length2D(void) const; float Length2DSqr(void) const; Vector& operator=(const Vector &vOther); @@ -428,13 +427,6 @@ inline float Vector::Dot(const Vector& vOther) const return(a.x*vOther.x + a.y*vOther.y + a.z*vOther.z); } -//================================================= -inline float Vector::Dot(const float* fOther) const -{ - const Vector& a = *this; - - return(a.x*fOther[0] + a.y*fOther[1] + a.z*fOther[2]); -} //----------------------------------------------------------------------------- // length diff --git a/src/Utils/math.cpp b/src/Utils/math.cpp index 37be1713f..0e8b31b1a 100644 --- a/src/Utils/math.cpp +++ b/src/Utils/math.cpp @@ -113,14 +113,6 @@ void Math::VectorAngles(const Vector& forward, QAngle &angles) angles[2] = 0.0f; } -void Math::VectorTransform( Vector& in1, matrix3x4_t& in2, Vector &out ) -{ - out.x = in1.Dot( in2.m_flMatVal[ 0 ] ) + in2.m_flMatVal[ 0 ][ 3 ]; - out.y = in1.Dot( in2.m_flMatVal[ 1 ] ) + in2.m_flMatVal[ 1 ][ 3 ]; - out.z = in1.Dot( in2.m_flMatVal[ 2 ] ) + in2.m_flMatVal[ 2 ][ 3 ]; -} - - QAngle Math::CalcAngle(Vector src, Vector dst) { QAngle angles; diff --git a/src/Utils/math.h b/src/Utils/math.h index 67324e8c0..e393b925b 100644 --- a/src/Utils/math.h +++ b/src/Utils/math.h @@ -10,6 +10,5 @@ namespace Math { void CorrectMovement(QAngle vOldAngles, CUserCmd* pCmd, float fOldForward, float fOldSidemove); float GetFov(const QAngle &viewAngle, const QAngle &aimAngle); void VectorAngles(const Vector &forward, QAngle &angles); - void VectorTransform(Vector& in1, matrix3x4_t& in2, Vector &out); QAngle CalcAngle(Vector src, Vector dst); } \ No newline at end of file