diff --git a/Amalgam/src/Features/Aimbot/AimbotHitscan/AimbotHitscan.cpp b/Amalgam/src/Features/Aimbot/AimbotHitscan/AimbotHitscan.cpp index 376f97c3..3936260c 100644 --- a/Amalgam/src/Features/Aimbot/AimbotHitscan/AimbotHitscan.cpp +++ b/Amalgam/src/Features/Aimbot/AimbotHitscan/AimbotHitscan.cpp @@ -699,16 +699,16 @@ void CAimbotHitscan::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pC const int nWeaponID = pWeapon->GetWeaponID(); static int iStaticAimType = Vars::Aimbot::General::AimType.Value; - const int iRealAimType = Vars::Aimbot::General::AimType.Value; const int iLastAimType = iStaticAimType; - iStaticAimType = iRealAimType; + const int iRealAimType = Vars::Aimbot::General::AimType.Value; switch (nWeaponID) { case TF_WEAPON_SNIPERRIFLE_CLASSIC: - if (!iRealAimType && iLastAimType && G::Attacking) + if (G::Attacking && !iRealAimType && iLastAimType) Vars::Aimbot::General::AimType.Value = iLastAimType; } + iStaticAimType = Vars::Aimbot::General::AimType.Value; if (F::AimbotGlobal.ShouldHoldAttack(pWeapon)) pCmd->buttons |= IN_ATTACK; diff --git a/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp b/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp index e30c67c0..1bc34360 100644 --- a/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp +++ b/Amalgam/src/Features/Aimbot/AimbotMelee/AimbotMelee.cpp @@ -422,11 +422,13 @@ void CAimbotMelee::Aim(CUserCmd* pCmd, Vec3& vAngle) void CAimbotMelee::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd) { - static int iAimType = 0; - if (pWeapon->m_flSmackTime() < 0.f) - iAimType = Vars::Aimbot::General::AimType.Value; - else if (iAimType) - Vars::Aimbot::General::AimType.Value = iAimType; + static int iStaticAimType = Vars::Aimbot::General::AimType.Value; + const int iLastAimType = iStaticAimType; + const int iRealAimType = Vars::Aimbot::General::AimType.Value; + + if (pWeapon->m_flSmackTime() > 0.f && !iRealAimType && iLastAimType) + Vars::Aimbot::General::AimType.Value = iLastAimType; + iStaticAimType = Vars::Aimbot::General::AimType.Value; if (F::AimbotGlobal.ShouldHoldAttack(pWeapon)) pCmd->buttons |= IN_ATTACK; diff --git a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp index 2d43fc4f..096ecdd4 100644 --- a/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp +++ b/Amalgam/src/Features/Aimbot/AimbotProjectile/AimbotProjectile.cpp @@ -898,9 +898,14 @@ static inline void SolveProjectileSpeed(CTFWeaponBase* pWeapon, const Vec3& vLoc case Demoman_s_TheQuickiebombLauncher: case Demoman_s_TheScottishResistance: flDrag = Math::RemapVal(flVelocity, 922.f, k_flMaxVelocity, 0.085f, 0.190f); break; // 0.085 low, 0.190 capped, 0.230 v2400 case Scout_s_TheFlyingGuillotine: - case Scout_s_TheFlyingGuillotineG: flDrag = 0.31f; break; + case Scout_s_TheFlyingGuillotineG: flDrag = 0.310f; break; case Scout_t_TheSandman: flDrag = 0.180f; break; case Scout_t_TheWrapAssassin: flDrag = 0.285f; break; + case Scout_s_MadMilk: + case Scout_s_MutatedMilk: + case Sniper_s_Jarate: + case Sniper_s_FestiveJarate: + case Sniper_s_TheSelfAwareBeautyMark: flDrag = 0.057f; break; } } @@ -1712,22 +1717,21 @@ bool CAimbotProjectile::RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser static int iStaticAimType = Vars::Aimbot::General::AimType.Value; const int iLastAimType = iStaticAimType; - const int iRealAimType = iStaticAimType = Vars::Aimbot::General::AimType.Value; + const int iRealAimType = Vars::Aimbot::General::AimType.Value; switch (nWeaponID) { case TF_WEAPON_COMPOUND_BOW: case TF_WEAPON_PIPEBOMBLAUNCHER: case TF_WEAPON_CANNON: - if (!Vars::Aimbot::General::AutoShoot.Value && !iRealAimType && iLastAimType && G::Attacking) + if (!Vars::Aimbot::General::AutoShoot.Value && G::Attacking && !iRealAimType && iLastAimType) + Vars::Aimbot::General::AimType.Value = iLastAimType; + break; + default: + if (G::Throwing && !iRealAimType && iLastAimType) Vars::Aimbot::General::AimType.Value = iLastAimType; } - - static int iAimType = 0; - if (!G::Throwing) - iAimType = Vars::Aimbot::General::AimType.Value; - else if (iAimType) - Vars::Aimbot::General::AimType.Value = iAimType; + iStaticAimType = Vars::Aimbot::General::AimType.Value; if (F::AimbotGlobal.ShouldHoldAttack(pWeapon)) pCmd->buttons |= IN_ATTACK; @@ -1883,14 +1887,6 @@ bool CAimbotProjectile::RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser } } - switch (nWeaponID) - { - case TF_WEAPON_BAT_WOOD: - case TF_WEAPON_BAT_GIFTWRAP: - case TF_WEAPON_LUNCHBOX: - if (iRealAimType && G::Throwing == 1) - G::Attacking = 1; - } Aim(pCmd, tTarget.m_vAngleTo); if (G::PSilentAngles) { diff --git a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp index 9d22e81c..fb31d9e5 100644 --- a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp +++ b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.cpp @@ -604,6 +604,7 @@ void CAutoHeal::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd) { m_mMedicCallers.clear(); m_iResistType = -1; + m_flDamagedTime = 0.f; return; } diff --git a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h index 7765f7cd..3a9c79cf 100644 --- a/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h +++ b/Amalgam/src/Features/Aimbot/AutoHeal/AutoHeal.h @@ -1,7 +1,7 @@ #pragma once #include "../../../SDK/SDK.h" -#define DEBUG_VACCINATOR +//#define DEBUG_VACCINATOR class CAutoHeal { diff --git a/Amalgam/src/Features/Binds/Binds.cpp b/Amalgam/src/Features/Binds/Binds.cpp index 4c840e8e..aa28c5c1 100644 --- a/Amalgam/src/Features/Binds/Binds.cpp +++ b/Amalgam/src/Features/Binds/Binds.cpp @@ -94,7 +94,10 @@ static inline void GetBinds(int iParent, CTFPlayer* pLocal, CTFWeaponBase* pWeap } case BindEnum::WeaponType: { - tBind.m_bActive = tBind.m_iInfo + 1 == int(SDK::GetWeaponType(pWeapon)); + if (tBind.m_iInfo != BindEnum::WeaponTypeEnum::Throwable) + tBind.m_bActive = tBind.m_iInfo + 1 == int(SDK::GetWeaponType(pWeapon)); + else + tBind.m_bActive = G::Throwing; if (tBind.m_bNot) tBind.m_bActive = !tBind.m_bActive; break; diff --git a/Amalgam/src/Features/Binds/Binds.h b/Amalgam/src/Features/Binds/Binds.h index 27ee572f..8bacb398 100644 --- a/Amalgam/src/Features/Binds/Binds.h +++ b/Amalgam/src/Features/Binds/Binds.h @@ -6,7 +6,7 @@ namespace BindEnum { Enum(Key, Hold, Toggle, DoubleClick) Enum(Class, Scout, Soldier, Pyro, Demoman, Heavy, Engineer, Medic, Sniper, Spy) - Enum(WeaponType, Hitscan, Projectile, Melee) + Enum(WeaponType, Hitscan, Projectile, Melee, Throwable) //Enum(ItemType, First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth) } Enum(BindVisibility, Always, WhileActive, Hidden) diff --git a/Amalgam/src/Features/ImGui/Menu/Components.h b/Amalgam/src/Features/ImGui/Menu/Components.h index 7eb2e3e7..b5cbcf7f 100644 --- a/Amalgam/src/Features/ImGui/Menu/Components.h +++ b/Amalgam/src/Features/ImGui/Menu/Components.h @@ -2494,7 +2494,7 @@ namespace ImGui { case BindEnum::Key: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Behavior", &tBind.m_iInfo, { "Hold", "Toggle", "Double click" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; case BindEnum::Class: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 8); FDropdown("Class", &tBind.m_iInfo, { "Scout", "Soldier", "Pyro", "Demoman", "Heavy", "Engineer", "Medic", "Sniper", "Spy" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; - case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; + case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 3); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee", "Throwable" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; case BindEnum::ItemSlot: tBind.m_iInfo = std::max(tBind.m_iInfo, 0); FDropdown("Item slot", &tBind.m_iInfo, { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, {}, FDropdownEnum::Right, 0, "None", &bHovered); break; } bLastHovered = bLastHovered || bHovered; diff --git a/Amalgam/src/Features/ImGui/Menu/Menu.cpp b/Amalgam/src/Features/ImGui/Menu/Menu.cpp index baa03cbb..88668ce2 100644 --- a/Amalgam/src/Features/ImGui/Menu/Menu.cpp +++ b/Amalgam/src/Features/ImGui/Menu/Menu.cpp @@ -2889,7 +2889,7 @@ void CMenu::MenuSettings(int iTab) { case BindEnum::Key: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Behavior", &tBind.m_iInfo, { "Hold", "Toggle", "Double click" }, {}, FDropdownEnum::Right); break; case BindEnum::Class: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 8); FDropdown("Class", &tBind.m_iInfo, { "Scout", "Soldier", "Pyro", "Demoman", "Heavy", "Engineer", "Medic", "Sniper", "Spy" }, {}, FDropdownEnum::Right); break; - case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 2); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee" }, {}, FDropdownEnum::Right); break; + case BindEnum::WeaponType: tBind.m_iInfo = std::clamp(tBind.m_iInfo, 0, 3); FDropdown("Weapon type", &tBind.m_iInfo, { "Hitscan", "Projectile", "Melee", "Throwable" }, {}, FDropdownEnum::Right); break; case BindEnum::ItemSlot: tBind.m_iInfo = std::max(tBind.m_iInfo, 0); FDropdown("Item slot", &tBind.m_iInfo, { "1", "2", "3", "4", "5", "6", "7", "8", "9" }, {}, FDropdownEnum::Right); break; } } EndChild(); @@ -2982,6 +2982,7 @@ void CMenu::MenuSettings(int iTab) case BindEnum::WeaponTypeEnum::Hitscan: { sInfo = "hitscan"; break; } case BindEnum::WeaponTypeEnum::Projectile: { sInfo = "projectile"; break; } case BindEnum::WeaponTypeEnum::Melee: { sInfo = "melee"; break; } + case BindEnum::WeaponTypeEnum::Throwable: { sInfo = "throwable"; break; } } break; case BindEnum::ItemSlot: @@ -3880,6 +3881,7 @@ void CMenu::DrawBinds() case BindEnum::WeaponTypeEnum::Hitscan: { sInfo = "hitscan"; break; } case BindEnum::WeaponTypeEnum::Projectile: { sInfo = "projectile"; break; } case BindEnum::WeaponTypeEnum::Melee: { sInfo = "melee"; break; } + case BindEnum::WeaponTypeEnum::Throwable: { sInfo = "throwable"; break; } } break; case BindEnum::ItemSlot: diff --git a/Amalgam/src/Features/Visuals/Glow/Glow.cpp b/Amalgam/src/Features/Visuals/Glow/Glow.cpp index 7d76f4cd..3da05dc4 100644 --- a/Amalgam/src/Features/Visuals/Glow/Glow.cpp +++ b/Amalgam/src/Features/Visuals/Glow/Glow.cpp @@ -299,7 +299,7 @@ void CGlow::SetupEnd(Glow_t glow, IMatRenderContext* pRenderContext, IMaterial* I::ModelRender->ForcedMaterialOverride(nullptr); } -void CGlow::DrawModel(CBaseEntity* pEntity, bool bModel) +void CGlow::DrawModel(CBaseEntity* pEntity) { m_bRendering = true; @@ -393,7 +393,7 @@ void CGlow::RenderMain() for (auto& tInfo : vInfo) { m_bExtra = tInfo.m_bExtra; - DrawModel(tInfo.m_pEntity, true); + DrawModel(tInfo.m_pEntity); m_bExtra = false; } @@ -403,7 +403,7 @@ void CGlow::RenderMain() I::RenderView->SetColorModulation(tInfo.m_cColor.r / 255.f, tInfo.m_cColor.g / 255.f, tInfo.m_cColor.b / 255.f); I::RenderView->SetBlend(tInfo.m_cColor.a / 255.f); m_bExtra = tInfo.m_bExtra; - DrawModel(tInfo.m_pEntity, false); + DrawModel(tInfo.m_pEntity); m_bExtra = false; } diff --git a/Amalgam/src/Features/Visuals/Glow/Glow.h b/Amalgam/src/Features/Visuals/Glow/Glow.h index d9a61202..b5018bce 100644 --- a/Amalgam/src/Features/Visuals/Glow/Glow.h +++ b/Amalgam/src/Features/Visuals/Glow/Glow.h @@ -15,7 +15,7 @@ class CGlow void SetupMid(IMatRenderContext* pRenderContext, int w, int h); void SetupEnd(Glow_t glow, IMatRenderContext* pRenderContext, IMaterial* m_pMatBlurX, IMaterial* m_pMatBlurY, IMaterial* m_pMatHaloAddToScreen, int w, int h); - void DrawModel(CBaseEntity* pEntity, bool bModel = false); + void DrawModel(CBaseEntity* pEntity); void RenderBacktrack(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo); void RenderFakeAngle(const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo); diff --git a/Amalgam/src/Features/Visuals/Visuals.cpp b/Amalgam/src/Features/Visuals/Visuals.cpp index a78bbb4d..1b84d86f 100644 --- a/Amalgam/src/Features/Visuals/Visuals.cpp +++ b/Amalgam/src/Features/Visuals/Visuals.cpp @@ -446,6 +446,7 @@ void CVisuals::DrawDebugInfo(CTFPlayer* pLocal) H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("CanSecondaryAttack: {} ([{:.3f} | {:.3f}] <= {:.3f})", G::CanSecondaryAttack, flSecondaryAttack, flAttack, flTime).c_str()); H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("Attack: {:.3f}, {:.3f}; {:.3f}", flTime - flPrimaryAttack, flTime - flSecondaryAttack, flTime - flAttack).c_str()); H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("Reload: {} ({} || {} != 0)", G::Reloading, pWeapon->m_bInReload(), pWeapon->m_iReloadMode()).c_str()); + H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOPLEFT, std::format("Throw: {}, Smack: {}", G::Throwing, pWeapon->m_flSmackTime()).c_str()); } } } diff --git a/Amalgam/src/SDK/SDK.cpp b/Amalgam/src/SDK/SDK.cpp index 885b8506..b7dda8f5 100644 --- a/Amalgam/src/SDK/SDK.cpp +++ b/Amalgam/src/SDK/SDK.cpp @@ -548,7 +548,7 @@ int SDK::IsAttacking(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, const CUserCmd* if (G::CanPrimaryAttack && pWeapon->HasPrimaryAmmoForShot() && pCmd->buttons & iAttack && iThrowTick == -5) iThrowTick = 12; if (iThrowTick > -5) - G::Throwing = G::CanSecondaryAttack = true; + G::Throwing = G::CanPrimaryAttack = true; if (iThrowTick > 1) G::Throwing = 2; return iThrowTick == 1;