beta auto vaccinator

medigun + misc fixes
backend changes
bug(?): friends (other playerlist stuff too?) may stop working for ~10(?) seconds, reproducible?
This commit is contained in:
rei-2 committed 2025-06-01 22:10:45 -04:00
1 parent 7a7bda16fe
commit a001d401a3
162 files changed
+2397 -1628

No files matched your search

+10 -3
View File
@@ -964,7 +964,8 @@
<ClCompile Include="src\Hooks\CBaseAnimating_UpdateClientSideAnimation.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_BaseInterpolatePart1.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_EstimateAbsVelocity.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_FireBullets.cpp" />
<ClCompile Include="src\Hooks\CTFRocketLauncher_CheckReloadMisfire.cpp" />
<ClCompile Include="src\Hooks\CTFPlayer_FireBullet.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_ResetLatched.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_SetAbsVelocity.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_WorldSpaceCenter.cpp" />
@@ -1058,6 +1059,13 @@
<ClCompile Include="src\Hooks\R_DrawSkyBox.cpp" />
<ClCompile Include="src\Hooks\TF_IsHolidayActive.cpp" />
<ClCompile Include="src\Hooks\VGuiMenuBuilder_AddMenuItem.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseAnimating.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseCombatCharacter.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseEntity.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseObject.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBasePlayer.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseProjectile.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CTFPlayer.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CTFWeaponBase.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\INetMessage.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\KeyValues.cpp" />
@@ -1369,7 +1377,6 @@
<ClInclude Include="src\SDK\Definitions\Main\CBasePlayer.h" />
<ClInclude Include="src\SDK\Definitions\Main\CBaseProjectile.h" />
<ClInclude Include="src\SDK\Definitions\Main\CEconDefinition.h" />
<ClInclude Include="src\SDK\Definitions\Main\CHalloweenPickup.h" />
<ClInclude Include="src\SDK\Definitions\Main\CMultiPlayerAnimState.h" />
<ClInclude Include="src\SDK\Definitions\Main\CTFPlayer.h" />
<ClInclude Include="src\SDK\Definitions\Main\CTFPlayerResource.h" />
@@ -1402,7 +1409,7 @@
<ClInclude Include="src\SDK\Definitions\Misc\ClientClass.h" />
<ClInclude Include="src\SDK\Definitions\Misc\CommonMacros.h" />
<ClInclude Include="src\SDK\Definitions\Misc\ConVar.h" />
<ClInclude Include="src\SDK\Definitions\Misc\CPlayerResource.h" />
<ClInclude Include="src\SDK\Definitions\Main\CPlayerResource.h" />
<ClInclude Include="src\SDK\Definitions\Misc\Cursor.h" />
<ClInclude Include="src\SDK\Definitions\Misc\CViewSetup.h" />
<ClInclude Include="src\SDK\Definitions\Misc\Datamap.h" />
+10 -3
View File
@@ -101,7 +101,7 @@
<ClCompile Include="src\Hooks\CBaseAnimating_UpdateClientSideAnimation.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_BaseInterpolatePart1.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_EstimateAbsVelocity.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_FireBullets.cpp" />
<ClCompile Include="src\Hooks\CTFPlayer_FireBullet.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_ResetLatched.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_SetAbsVelocity.cpp" />
<ClCompile Include="src\Hooks\CBaseEntity_WorldSpaceCenter.cpp" />
@@ -195,6 +195,14 @@
<ClCompile Include="src\Hooks\IMatSystemSurface_OnScreenSizeChanged.cpp" />
<ClCompile Include="src\Features\Visuals\Groups\Groups.cpp" />
<ClCompile Include="src\Hooks\CViewRender_LevelShutdown.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CTFPlayer.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseAnimating.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseCombatCharacter.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseEntity.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseObject.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBasePlayer.cpp" />
<ClCompile Include="src\SDK\Definitions\Main\CBaseProjectile.cpp" />
<ClCompile Include="src\Hooks\CTFRocketLauncher_CheckReloadMisfire.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\Utils\UtlVector\UtlVector.h" />
@@ -238,7 +246,6 @@
<ClInclude Include="src\SDK\Definitions\Main\CBasePlayer.h" />
<ClInclude Include="src\SDK\Definitions\Main\CBaseProjectile.h" />
<ClInclude Include="src\SDK\Definitions\Main\CEconDefinition.h" />
<ClInclude Include="src\SDK\Definitions\Main\CHalloweenPickup.h" />
<ClInclude Include="src\SDK\Definitions\Main\CMultiPlayerAnimState.h" />
<ClInclude Include="src\SDK\Definitions\Main\CTFPlayer.h" />
<ClInclude Include="src\SDK\Definitions\Main\CTFPlayerResource.h" />
@@ -271,7 +278,7 @@
<ClInclude Include="src\SDK\Definitions\Misc\ClientClass.h" />
<ClInclude Include="src\SDK\Definitions\Misc\CommonMacros.h" />
<ClInclude Include="src\SDK\Definitions\Misc\ConVar.h" />
<ClInclude Include="src\SDK\Definitions\Misc\CPlayerResource.h" />
<ClInclude Include="src\SDK\Definitions\Main\CPlayerResource.h" />
<ClInclude Include="src\SDK\Definitions\Misc\Cursor.h" />
<ClInclude Include="src\SDK\Definitions\Misc\CViewSetup.h" />
<ClInclude Include="src\SDK\Definitions\Misc\Datamap.h" />
+17 -5
View File
@@ -63,13 +63,25 @@ namespace MAKE_INTERFACE_SCOPE \
{ \
return *reinterpret_cast<type*>(uintptr_t(this) + offset); \
}
#define VIRTUAL(name, type, fn, base, index) inline type name() \
{ \
return reinterpret_cast<type(*)(fn)>(U::Memory.GetVFunc(base, index))(base); \
}
#define CONDGET(name, conditions, cond) inline bool name() \
{ \
return (conditions & cond); \
return conditions & cond; \
}
#define VIRTUAL(name, type, index, ...) inline type name() \
{ \
return U::Memory.CallVirtual<index, type>(##__VA_ARGS__); \
}
#define VIRTUAL_ARGS(name, type, index, args, ...) inline type name##args \
{ \
return U::Memory.CallVirtual<index, type>(##__VA_ARGS__); \
}
#define SIGNATURE(name, type, sig, ...) inline type name() \
{ \
return S::sig##_##name.Call<type>(##__VA_ARGS__); \
}
#define SIGNATURE_ARGS(name, type, sig, args, ...) inline type name##args \
{ \
return S::sig##_##name.Call<type>(##__VA_ARGS__); \
}
#define VA_LIST(...) __VA_ARGS__
+3 -3
View File
@@ -73,11 +73,11 @@ void CCore::Load()
return;
}
float flStart = SDK::PlatFloatTime();
float flTime = 0.f;
while (!U::Memory.FindSignature("client.dll", "48 8B 0D ? ? ? ? 48 8B 10 48 8B 19 48 8B C8 FF 92") || !SDK::GetTeamFortressWindow())
{
Sleep(500);
if (m_bUnload = m_bFailed = SDK::PlatFloatTime() - flStart > 60.f)
Sleep(500), flTime += 0.5f;
if (m_bUnload = m_bFailed = flTime >= 60.f)
{
AppendFailText("Failed to load");
return;
+4 -16
View File
@@ -12,21 +12,9 @@
bool CAimbot::ShouldRun(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
{
if (!pLocal || !pWeapon
|| !pLocal->IsAlive()
|| pLocal->IsAGhost()
|| pLocal->IsTaunting()
|| pLocal->InCond(TF_COND_STUNNED) && pLocal->m_iStunFlags() & (TF_STUN_CONTROLS | TF_STUN_LOSER_STATE)
|| pLocal->m_bFeignDeathReady()
|| pLocal->InCond(TF_COND_PHASE)
|| pLocal->InCond(TF_COND_STEALTHED)
|| pLocal->InCond(TF_COND_HALLOWEEN_KART))
return false;
if (SDK::AttribHookValue(1, "mult_dmg", pWeapon) == 0)
return false;
if (I::EngineVGui->IsGameUIVisible())
if (!pLocal || !pWeapon || !pLocal->CanAttack()
|| SDK::AttribHookValue(1, "mult_dmg", pWeapon) == 0
|| I::EngineVGui->IsGameUIVisible())
return false;
return true;
@@ -90,7 +78,7 @@ void CAimbot::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
void CAimbot::Draw(CTFPlayer* pLocal)
{
if (!Vars::Aimbot::General::FOVCircle.Value || !Vars::Colors::FOVCircle.Value.a || !pLocal->IsAlive() || pLocal->IsAGhost() || pLocal->IsTaunting() || pLocal->InCond(TF_COND_STUNNED) && pLocal->m_iStunFlags() & (TF_STUN_CONTROLS | TF_STUN_LOSER_STATE) || pLocal->InCond(TF_COND_HALLOWEEN_KART))
if (!Vars::Aimbot::General::FOVCircle.Value || !Vars::Colors::FOVCircle.Value.a || !pLocal->CanAttack(false))
return;
auto pWeapon = H::Entities.GetWeapon();
+1 -1
View File
@@ -16,4 +16,4 @@ public:
bool m_bRunningSecondary = false;
};
ADD_FEATURE(CAimbot, Aimbot)
ADD_FEATURE(CAimbot, Aimbot);
@@ -142,7 +142,7 @@ bool CAimbotGlobal::ShouldIgnore(CBaseEntity* pEntity, CTFPlayer* pLocal, CTFWea
if (Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Friends && H::Entities.IsFriend(pPlayer->entindex())
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Party && H::Entities.InParty(pPlayer->entindex())
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Invulnerable && pPlayer->IsInvulnerable() && SDK::AttribHookValue(0, "crit_forces_victim_to_laugh", pWeapon) <= 0
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Cloaked && pPlayer->IsInvisible() && pPlayer->GetInvisPercentage() >= Vars::Aimbot::General::IgnoreCloak.Value
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Cloaked && pPlayer->m_flInvisibility() && pPlayer->m_flInvisibility() >= Vars::Aimbot::General::IgnoreCloak.Value / 100.f
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::DeadRinger && pPlayer->m_bFeignDeathReady()
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Taunting && pPlayer->IsTaunting()
|| Vars::Aimbot::General::Ignore.Value & Vars::Aimbot::General::IgnoreEnum::Disguised && pPlayer->InCond(TF_COND_DISGUISED))
@@ -36,4 +36,4 @@ public:
bool ValidBomb(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CBaseEntity* pBomb);
};
ADD_FEATURE(CAimbotGlobal, AimbotGlobal)
ADD_FEATURE(CAimbotGlobal, AimbotGlobal);
@@ -348,7 +348,7 @@ int CAimbotHitscan::CanHit(Target_t& tTarget, CTFPlayer* pLocal, CTFWeaponBase*
const matrix3x4 mTransform = { { 1, 0, 0, tTarget.m_vPos.x }, { 0, 1, 0, tTarget.m_vPos.y }, { 0, 0, 1, tTarget.m_vPos.z } };
tTarget.m_vPos += (tTarget.m_pEntity->m_vecMins() + tTarget.m_pEntity->m_vecMaxs()) / 2;
tTarget.m_vPos += tTarget.m_pEntity->GetOffset() / 2;
if (vEyePos.DistToSqr(tTarget.m_vPos) > flMaxRange)
break;
@@ -607,23 +607,21 @@ bool CAimbotHitscan::ShouldFire(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
auto pSniperRifle = pWeapon->As<CTFSniperRifle>();
if (!pLocal->InCond(TF_COND_AIMING) || pSniperRifle->m_flChargedDamage() == 150.f)
return true;
break;
if (tTarget.m_nAimedHitbox == HITBOX_HEAD && (pWeapon->GetWeaponID() != TF_WEAPON_SNIPERRIFLE_CLASSIC ? true : pSniperRifle->m_flChargedDamage() == 150.f))
{
if (pSniperRifle->GetRifleType() == RIFLE_JARATE)
return true;
int iHeadDamage = std::ceil(std::max(pSniperRifle->m_flChargedDamage(), 50.f) * pSniperRifle->GetHeadshotMult(pPlayer));
if (pPlayer->m_iHealth() <= iHeadDamage && (G::CanHeadshot || pLocal->IsCritBoosted()))
return true;
break;
}
else
{
int iBodyDamage = std::ceil(std::max(pSniperRifle->m_flChargedDamage(), 50.f) * pSniperRifle->GetBodyshotMult(pPlayer));
if (pPlayer->m_iHealth() <= iBodyDamage)
return true;
break;
}
return false;
}
}
@@ -786,14 +784,22 @@ void CAimbotHitscan::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pC
if (bShouldFire)
{
if (nWeaponID != TF_WEAPON_MEDIGUN || !(G::LastUserCmd->buttons & IN_ATTACK))
switch (nWeaponID)
{
case TF_WEAPON_MEDIGUN:
if (!(G::LastUserCmd->buttons & IN_ATTACK))
pCmd->buttons |= IN_ATTACK;
break;
case TF_WEAPON_SNIPERRIFLE_CLASSIC:
if (pWeapon->As<CTFSniperRifle>()->m_flChargedDamage() && pLocal->m_hGroundEntity())
pCmd->buttons &= ~IN_ATTACK;
break;
case TF_WEAPON_LASER_POINTER:
pCmd->buttons |= IN_ATTACK | IN_ATTACK2;
break;
default:
pCmd->buttons |= IN_ATTACK;
if (nWeaponID == TF_WEAPON_SNIPERRIFLE_CLASSIC && pWeapon->As<CTFSniperRifle>()->m_flChargedDamage() && pLocal->m_hGroundEntity())
pCmd->buttons &= ~IN_ATTACK;
if (nWeaponID == TF_WEAPON_LASER_POINTER)
pCmd->buttons |= IN_ATTACK2;
}
if (Vars::Aimbot::Hitscan::Modifiers.Value & Vars::Aimbot::Hitscan::ModifiersEnum::Tapfire && pWeapon->GetWeaponSpread() != 0.f && !pLocal->InCond(TF_COND_RUNE_PRECISION)
&& pLocal->GetShootPos().DistTo(tTarget.m_vPos) > Vars::Aimbot::Hitscan::TapFireDist.Value)
@@ -842,6 +848,15 @@ void CAimbotHitscan::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pC
}
Aim(pCmd, tTarget.m_vAngleTo);
if (G::SilentAngles)
{
switch (nWeaponID)
{
case TF_WEAPON_MEDIGUN:
//case TF_WEAPON_LASER_POINTER: // we can psilent with the wrangler though probably with some hacks
G::SilentAngles = false, G::PSilentAngles = true;
}
}
break;
}
}
@@ -19,4 +19,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
};
ADD_FEATURE(CAimbotHitscan, AimbotHitscan)
ADD_FEATURE(CAimbotHitscan, AimbotHitscan);
@@ -592,7 +592,7 @@ bool CAimbotMelee::RunSapper(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd
for (auto pEntity : H::Entities.GetGroup(EGroupType::BUILDINGS_ENEMIES))
{
auto pBuilding = pEntity->As<CBaseObject>();
if (pBuilding->m_bHasSapper() || pBuilding->m_iTeamNum() != TF_TEAM_BLUE && pBuilding->m_iTeamNum() != TF_TEAM_RED)
if (pBuilding->m_bHasSapper() || !pBuilding->IsInValidTeam())
continue;
Vec3 vPoint;
@@ -29,4 +29,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
};
ADD_FEATURE(CAimbotMelee, AimbotMelee)
ADD_FEATURE(CAimbotMelee, AimbotMelee);
@@ -149,7 +149,7 @@ std::vector<Target_t> CAimbotProjectile::SortTargets(CTFPlayer* pLocal, CTFWeapo
static inline float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pLocal = nullptr)
float CAimbotProjectile::GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pPlayer)
{
float flRadius = 0.f;
switch (pWeapon->GetWeaponID())
@@ -174,7 +174,7 @@ static inline float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pLocal =
case TF_WEAPON_ROCKETLAUNCHER:
case TF_WEAPON_ROCKETLAUNCHER_DIRECTHIT:
case TF_WEAPON_PARTICLE_CANNON:
if (pLocal->InCond(TF_COND_BLASTJUMPING) && SDK::AttribHookValue(1.f, "rocketjump_attackrate_bonus", pWeapon) != 1.f)
if (pPlayer->InCond(TF_COND_BLASTJUMPING) && SDK::AttribHookValue(1.f, "rocketjump_attackrate_bonus", pWeapon) != 1.f)
flRadius *= 0.8f;
}
return flRadius * Vars::Aimbot::Projectile::SplashRadius.Value / 100;
@@ -1349,7 +1349,7 @@ int CAimbotProjectile::CanHit(Target_t& tTarget, CTFPlayer* pLocal, CTFWeaponBas
ProjectileInfo tProjInfo = {};
int iMaxTime, iSplash; Info_t tInfo = { pLocal, pWeapon };
const float flSize = tTarget.m_pEntity->m_vecMins().DistTo(tTarget.m_pEntity->m_vecMaxs());
const float flSize = tTarget.m_pEntity->GetSize().Length();
{
int iFlags = ProjSimEnum::NoRandomAngles | ProjSimEnum::PredictCmdNum;
if (!F::ProjSim.GetInfo(pLocal, pWeapon, {}, tProjInfo, iFlags) || !F::ProjSim.Initialize(tProjInfo, false))
@@ -1812,41 +1812,41 @@ bool CAimbotProjectile::RunMain(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
if (Vars::Aimbot::General::AutoShoot.Value)
{
pCmd->buttons |= IN_ATTACK;
if (pWeapon->m_iItemDefinitionIndex() == Soldier_m_TheBeggarsBazooka)
switch (nWeaponID)
{
if (pWeapon->m_iClip1() > 0)
case TF_WEAPON_COMPOUND_BOW:
case TF_WEAPON_PIPEBOMBLAUNCHER:
pCmd->buttons |= IN_ATTACK;
if (pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() > 0.f)
pCmd->buttons &= ~IN_ATTACK;
}
else
{
switch (nWeaponID)
break;
case TF_WEAPON_CANNON:
pCmd->buttons |= IN_ATTACK;
if (pWeapon->As<CTFGrenadeLauncher>()->m_flDetonateTime() > 0.f)
{
case TF_WEAPON_COMPOUND_BOW:
case TF_WEAPON_PIPEBOMBLAUNCHER:
if (pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() > 0.f)
pCmd->buttons &= ~IN_ATTACK;
break;
case TF_WEAPON_CANNON:
if (pWeapon->As<CTFGrenadeLauncher>()->m_flDetonateTime() > 0.f)
if (m_iLastTickCancel)
pCmd->weaponselect = m_iLastTickCancel = 0;
if (Vars::Aimbot::Projectile::Modifiers.Value & Vars::Aimbot::Projectile::ModifiersEnum::ChargeWeapon)
{
if (m_iLastTickCancel)
pCmd->weaponselect = m_iLastTickCancel = 0;
if (Vars::Aimbot::Projectile::Modifiers.Value & Vars::Aimbot::Projectile::ModifiersEnum::ChargeWeapon)
{
float flCharge = pWeapon->As<CTFGrenadeLauncher>()->m_flDetonateTime() - I::GlobalVars->curtime;
if (std::clamp(flCharge, 0.f, 1.f) < flTimeTo)
pCmd->buttons &= ~IN_ATTACK;
}
else
float flCharge = pWeapon->As<CTFGrenadeLauncher>()->m_flDetonateTime() - I::GlobalVars->curtime;
if (std::clamp(flCharge, 0.f, 1.f) < flTimeTo)
pCmd->buttons &= ~IN_ATTACK;
}
break;
case TF_WEAPON_BAT_WOOD:
case TF_WEAPON_BAT_GIFTWRAP:
case TF_WEAPON_LUNCHBOX:
pCmd->buttons &= ~IN_ATTACK, pCmd->buttons |= IN_ATTACK2;
else
pCmd->buttons &= ~IN_ATTACK;
}
break;
case TF_WEAPON_BAT_WOOD:
case TF_WEAPON_BAT_GIFTWRAP:
case TF_WEAPON_LUNCHBOX:
pCmd->buttons &= ~IN_ATTACK, pCmd->buttons |= IN_ATTACK2;
break;
default:
pCmd->buttons |= IN_ATTACK;
if (pWeapon->m_iItemDefinitionIndex() == Soldier_m_TheBeggarsBazooka)
{
if (pWeapon->m_iClip1() > 0)
pCmd->buttons &= ~IN_ATTACK;
}
}
}
@@ -68,8 +68,9 @@ class CAimbotProjectile
public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
float GetSplashRadius(CTFWeaponBase* pWeapon, CTFPlayer* pPlayer);
int m_iLastTickCancel = 0;
};
ADD_FEATURE(CAimbotProjectile, AimbotProjectile)
ADD_FEATURE(CAimbotProjectile, AimbotProjectile);
@@ -9,4 +9,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
};
ADD_FEATURE(CAutoAirblast, AutoAirblast)
ADD_FEATURE(CAutoAirblast, AutoAirblast);
@@ -102,7 +102,7 @@ static inline bool CheckEntities(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUse
if (Vars::Aimbot::Projectile::AutoDetonate.Value & Vars::Aimbot::Projectile::AutoDetonateEnum::IgnoreCloak && pEntity->IsPlayer())
{
auto pPlayer = pEntity->As<CTFPlayer>();
if (pPlayer->IsInvisible() && pPlayer->GetInvisPercentage() >= Vars::Aimbot::General::IgnoreCloak.Value)
if (pPlayer->m_flInvisibility() && pPlayer->m_flInvisibility() >= Vars::Aimbot::General::IgnoreCloak.Value / 100.f)
continue;
}
@@ -17,4 +17,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
};
ADD_FEATURE(CAutoDetonate, AutoDetonate)
ADD_FEATURE(CAutoDetonate, AutoDetonate);
+686 -10
View File
@@ -1,27 +1,703 @@
#include "AutoHeal.h"
#include "../../Players/PlayerUtils.h"
#include "../../Backtrack/Backtrack.h"
#include "../../CritHack/CritHack.h"
#include "../../Simulation/ProjectileSimulation/ProjectileSimulation.h"
#include "../AimbotProjectile/AimbotProjectile.h"
bool CAutoHeal::ActivateOnVoice(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd)
void CAutoHeal::ActivateOnVoice(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd)
{
if (!Vars::Aimbot::Healing::ActivateOnVoice.Value)
return false;
return;
auto pTarget = pWeapon->m_hHealingTarget().Get();
if (!pTarget || Vars::Aimbot::Healing::FriendsOnly.Value && !H::Entities.IsFriend(pTarget->entindex()) && !H::Entities.InParty(pTarget->entindex()))
return false;
return;
bool bReturn = m_mMedicCallers.contains(pTarget->entindex());
if (bReturn)
if (m_mMedicCallers.contains(pTarget->entindex()))
pCmd->buttons |= IN_ATTACK2;
}
return bReturn;
static inline Vec3 PredictOrigin(Vec3& vOrigin, Vec3 vVelocity, float flLatency, bool bTrace = true, Vec3 vMins = {}, Vec3 vMaxs = {}, unsigned int nMask = MASK_SOLID, float flNormal = 0.f)
{
if (vVelocity.IsZero() || !flLatency)
return vOrigin;
Vec3 vTo = vOrigin + vVelocity * flLatency;
if (!bTrace)
return vTo;
CGameTrace trace = {};
CTraceFilterWorldAndPropsOnly filter = {};
SDK::TraceHull(vOrigin, vTo, vMins, vMaxs, nMask, &filter, &trace);
//G::SweptStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), vMins, vMaxs, Vec3(), I::GlobalVars->curtime + 60.f, Color_t(255, 255, 255, 10), true);
Vec3 vOrigin2 = vOrigin + (vTo - vOrigin) * trace.fraction;
if (trace.DidHit() && flNormal)
vOrigin2 += trace.plane.normal * flNormal;
return vOrigin2;
}
static inline bool TraceToEntity(CTFPlayer* pPlayer, CBaseEntity* pEntity, Vec3& vPlayerOrigin, Vec3& vEntityOrigin, unsigned int nMask = MASK_SHOT | CONTENTS_GRATE)
{
CGameTrace trace = {};
CTraceFilterWorldAndPropsOnly filter = {};
if (pEntity->IsPlayer())
{
Vec3 vMins = pPlayer->m_vecMins() + 1;
Vec3 vMaxs = pPlayer->m_vecMaxs() - 1;
Vec3 vMinsS = (vMins - vMaxs) / 2;
Vec3 vMaxsS = (vMaxs - vMins) / 2;
std::vector<Vec3> vPoints = {
Vec3(),
Vec3(vMinsS.x, vMinsS.y, vMaxsS.z),
Vec3(vMaxsS.x, vMinsS.y, vMaxsS.z),
Vec3(vMinsS.x, vMaxsS.y, vMaxsS.z),
Vec3(vMaxsS.x, vMaxsS.y, vMaxsS.z),
Vec3(vMinsS.x, vMinsS.y, vMinsS.z),
Vec3(vMaxsS.x, vMinsS.y, vMinsS.z),
Vec3(vMinsS.x, vMaxsS.y, vMinsS.z),
Vec3(vMaxsS.x, vMaxsS.y, vMinsS.z)
};
for (auto& vPoint : vPoints)
{
SDK::Trace(vPlayerOrigin + vPoint, vEntityOrigin, nMask, &filter, &trace);
//if (trace.fraction == 1.f)
// G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Color_t(0, 255, 0, 25), true);
if (trace.fraction == 1.f)
return true;
}
}
else
{
SDK::Trace(vPlayerOrigin, vEntityOrigin, nMask, &filter, &trace);
//if (trace.fraction == 1.f)
// G::LineStorage.emplace_back(std::pair<Vec3, Vec3>(trace.startpos, trace.endpos), I::GlobalVars->curtime + 60.f, Color_t(0, 255, 0, 25), true);
return trace.fraction == 1.f;
}
return false;
}
static inline int GetShotsWithinTime(int iWeaponID, float flFireRate, float flTime)
{
int iTicks = TIME_TO_TICKS(flTime);
int iDelay = 1;
switch (iWeaponID)
{
case TF_WEAPON_MINIGUN:
case TF_WEAPON_PIPEBOMBLAUNCHER:
case TF_WEAPON_CANNON:
iDelay = 2;
}
return 1 + (iTicks - iDelay) / std::ceilf(flFireRate / TICK_INTERVAL);
}
void CAutoHeal::GetDangers(CTFPlayer* pTarget, bool bVaccinator, float& flBulletOut, float& flBlastOut, float& flFireOut)
{
if (pTarget->IsInvulnerable())
return;
float flBulletDanger = 0.f, flBlastDanger = 0.f, flFireDanger = 0.f;
float flBulletResist = pTarget->InCond(TF_COND_BULLET_IMMUNE) ? 1.f : pTarget->InCond(TF_COND_MEDIGUN_UBER_BULLET_RESIST) ? 0.75f : pTarget->InCond(TF_COND_MEDIGUN_SMALL_BULLET_RESIST) ? -0.1f : 0.f;
float flBlastResist = pTarget->InCond(TF_COND_BLAST_IMMUNE) ? 1.f : pTarget->InCond(TF_COND_MEDIGUN_UBER_BLAST_RESIST) ? 0.75f : pTarget->InCond(TF_COND_MEDIGUN_SMALL_BLAST_RESIST) ? -0.1f : 0.f;
float flFireResist = pTarget->InCond(TF_COND_FIRE_IMMUNE) ? 1.f : pTarget->InCond(TF_COND_MEDIGUN_UBER_FIRE_RESIST) ? 0.75f : pTarget->InCond(TF_COND_MEDIGUN_SMALL_FIRE_RESIST) ? -0.1f : 0.f;
float flLatency = F::Backtrack.GetReal();
int iPlayerHealth = pTarget->m_iHealth();
Vec3 vTargetOrigin = PredictOrigin(pTarget->m_vecOrigin(), pTarget->m_vecVelocity(), pTarget->entindex() != I::EngineClient->GetLocalPlayer() ? flLatency : 0.f, true, pTarget->m_vecMins(), pTarget->m_vecMaxs(), pTarget->SolidMask());
Vec3 vTargetCenter = vTargetOrigin + pTarget->GetOffset() / 2;
Vec3 vTargetEye = vTargetOrigin + pTarget->GetViewOffset();
for (auto pEntity : H::Entities.GetGroup(EGroupType::PLAYERS_ENEMIES))
{
auto pPlayer = pEntity->As<CTFPlayer>();
int iIndex = pPlayer->entindex();
if (pPlayer->IsDormant() || !pPlayer->CanAttack(true, false))
continue;
auto pWeapon = pPlayer->m_hActiveWeapon().Get()->As<CTFWeaponBase>();
int nWeaponID = pWeapon ? pWeapon->GetWeaponID() : 0;
auto eWeaponType = SDK::GetWeaponType(pWeapon);
if (eWeaponType == EWeaponType::UNKNOWN || eWeaponType == EWeaponType::MELEE // if we ever want to port this over to auto uber or something, handle melee
|| nWeaponID == TF_WEAPON_DRG_POMSON || nWeaponID == TF_WEAPON_PIPEBOMBLAUNCHER
|| nWeaponID == TF_WEAPON_MINIGUN && !pPlayer->InCond(TF_COND_AIMING))
continue;
Vec3 vPlayerOrigin = PredictOrigin(pPlayer->m_vecOrigin(), pPlayer->m_vecVelocity(), flLatency, true, pPlayer->m_vecMins(), pPlayer->m_vecMaxs(), pPlayer->SolidMask());
Vec3 vPlayerEye = vPlayerOrigin + pPlayer->GetViewOffset();
bool bCheater = F::PlayerUtils.HasTag(iIndex, F::PlayerUtils.TagToIndex(CHEATER_TAG));
bool bZoom = pPlayer->InCond(TF_COND_ZOOMED);
float flFOV = Math::CalcFov(H::Entities.GetEyeAngles(iIndex) + H::Entities.GetPingAngles(iIndex), Math::CalcAngle(vPlayerEye, bZoom ? vTargetEye : vTargetCenter));
bool bFOV = bCheater || flFOV < (bZoom ? 10 : eWeaponType == EWeaponType::HITSCAN ? 30 : 90);
if (!bFOV || !TraceToEntity(pTarget, pPlayer, vTargetCenter, vPlayerEye))
continue;
bool bCrits = pPlayer->IsCritBoosted() || F::CritHack.WeaponCanCrit(pWeapon);
bool bMinicrits = pPlayer->IsMiniCritBoosted() || pTarget->IsMarked();
float flDistance = vPlayerEye.DistTo(vTargetCenter);
float flDamage, flMult = bCrits ? 3.f : bMinicrits ? 1.36f : 1.f;
float flFireRate = std::min(pWeapon->GetFireRate(), 1.f);
int iBulletCount = pWeapon->GetBulletsPerShot();
int iShotsWithinTime = GetShotsWithinTime(nWeaponID, flFireRate, flLatency + TICKS_TO_TIME(bCheater ? 22 : 0));
switch (nWeaponID)
{
case TF_WEAPON_SNIPERRIFLE:
case TF_WEAPON_SNIPERRIFLE_DECAP:
case TF_WEAPON_SNIPERRIFLE_CLASSIC:
{
bool bClassic = nWeaponID == TF_WEAPON_SNIPERRIFLE_CLASSIC;
bool bHeadshot = pWeapon->As<CTFSniperRifle>()->GetRifleType() != RIFLE_JARATE;
bool bPiss = SDK::AttribHookValue(0, "jarate_duration", pWeapon) > 0;
auto GetSniperDot = [](CBaseEntity* pEntity) -> CSniperDot*
{
for (auto pDot : H::Entities.GetGroup(EGroupType::MISC_DOTS))
{
if (pDot->m_hOwnerEntity().Get() == pEntity)
return pDot->As<CSniperDot>();
}
return nullptr;
};
if (CSniperDot* pPlayerDot = GetSniperDot(pEntity))
{
float flChargeTime = std::max(SDK::AttribHookValue(3.f, "mult_sniper_charge_per_sec", pWeapon), 1.5f);
flDamage = Math::RemapVal(TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick) - pPlayerDot->m_flChargeStartTime() - 0.3f, 0.f, flChargeTime, 50.f, 150.f);
if (bClassic && flDamage != 150.f)
flDamage = SDK::AttribHookValue(flDamage, "bodyshot_damage_modify", pWeapon);
else
flMult = std::max(bHeadshot || bClassic ? 3.f : bPiss ? 1.36f : 1.f, flMult);
break;
}
if (SDK::AttribHookValue(0, "sniper_only_fire_zoomed", pWeapon) && !bZoom)
flDamage = 0.f;
else if (bClassic || !bZoom)
flDamage = SDK::AttribHookValue(50.f, "bodyshot_damage_modify", pWeapon);
else
flDamage = 150.f, flMult = flMult = std::max(bHeadshot || bClassic ? 3.f : bPiss ? 1.36f : 1.f, flMult);
break;
}
case TF_WEAPON_COMPOUND_BOW:
flDamage = 120.f, flMult = 3.f;
break;
case TF_WEAPON_FLAMETHROWER:
flDamage = 80.f * flFireRate;
break;
default:
flDamage = pWeapon->GetDamage(false);
}
switch (eWeaponType)
{
case EWeaponType::HITSCAN:
{
flMult = flBulletResist > 0.f ? 1.f - flBulletResist : flMult + flBulletResist;
flDamage *= flMult * (pWeapon ? SDK::AttribHookValue(1.f, "mult_dmg", pWeapon) : 1);
float flSpread = std::clamp(pWeapon->GetWeaponSpread(), 0.001f, 1.f);
float flMappedCount = Math::RemapVal(flDistance, 20 / flSpread, 100 / flSpread, iBulletCount, 1);
float flDamageInLatency = flDamage * flMappedCount * iShotsWithinTime;
float flDamageDanger = flDamageInLatency / iPlayerHealth;
float flDistanceDanger = Math::RemapVal(flDistance, 100, 100 / flSpread, 1.f, 0.001f);
if (bCheater) // may use seed pred +/ crits
flDistanceDanger = std::max(flDistanceDanger, bCrits ? 1.f : 0.34f);
//SDK::Output("Hitscan", std::format("{}, {}, {}, {}, {}", flDamage, flSpread, flDamageInLatency, flDamageDanger, flDistanceDanger).c_str(), { 255, 200, 200 }, Vars::Debug::Logging.Value);
flBulletDanger += flDamageDanger * flDistanceDanger;
break;
}
case EWeaponType::PROJECTILE:
{
ProjectileInfo tProjInfo = {};
if (!F::ProjSim.GetInfo(pPlayer, pWeapon, {}, tProjInfo, ProjSimEnum::NoRandomAngles | ProjSimEnum::MaxSpeed))
continue;
int iType = MEDIGUN_BLAST_RESIST;
switch (nWeaponID)
{
case TF_WEAPON_COMPOUND_BOW:
case TF_WEAPON_CROSSBOW:
case TF_WEAPON_SHOTGUN_BUILDING_RESCUE:
case TF_WEAPON_SYRINGEGUN_MEDIC:
case TF_WEAPON_RAYGUN: iType = MEDIGUN_BULLET_RESIST; break;
case TF_WEAPON_FLAMETHROWER: // maybe just test full range?
case TF_WEAPON_FLAME_BALL: iType = MEDIGUN_FIRE_RESIST; break;
}
switch (iType)
{
case MEDIGUN_BULLET_RESIST: flMult = flBulletResist > 0.f ? 1.f - flBulletResist : flMult + flBulletResist; break;
case MEDIGUN_BLAST_RESIST: flMult = flBlastResist > 0.f ? 1.f - flBlastResist : flMult + flBlastResist; break;
case MEDIGUN_FIRE_RESIST: flMult = flFireResist > 0.f ? 1.f - flFireResist : flMult + flFireResist; break;
}
flDamage *= flMult * (pWeapon ? SDK::AttribHookValue(1.f, "mult_dmg", pWeapon) : 1);
float flRadius = tProjInfo.m_flVelocity * flLatency + F::AimbotProjectile.GetSplashRadius(pWeapon, pPlayer) + pTarget->GetSize().Length() / 2;
float flDamageInLatency = flDamage * iBulletCount * iShotsWithinTime;
float flDamageDanger = flDamageInLatency / iPlayerHealth;
float flDistanceDanger = Math::RemapVal(flDistance, flRadius, flRadius, 1.f, 0.001f);
//SDK::Output("Projectile", std::format("{}, {}, {}, {}", flDamage, flDamageInLatency, flDamageDanger, flDistanceDanger).c_str(), { 255, 200, 200 }, Vars::Debug::Logging.Value);
switch (iType)
{
case MEDIGUN_BULLET_RESIST: flBulletDanger += flDamageDanger * flDistanceDanger; break;
case MEDIGUN_BLAST_RESIST: flBlastDanger += flDamageDanger * flDistanceDanger; break;
case MEDIGUN_FIRE_RESIST: flFireDanger += flDamageDanger * flDistanceDanger; break;
}
}
}
}
for (auto pEntity : H::Entities.GetGroup(EGroupType::BUILDINGS_ENEMIES))
{
auto pSentry = pEntity->As<CObjectSentrygun>();
if (pSentry->GetClassID() != ETFClassID::CObjectSentrygun)
continue;
if (pSentry->m_hEnemy().Get() != pTarget && pSentry->m_hAutoAimTarget().Get() != pTarget || !pSentry->m_iAmmoShells())
continue;
float flDistance = pSentry->GetCenter().DistTo(vTargetCenter);
float flDamage = 19.f, flMult = pTarget->IsMarked() ? 1.36f : 1.f;
float flFireRate;
switch (pSentry->m_bMiniBuilding() ? 0 : pSentry->m_iUpgradeLevel())
{
case 0:
flDamage /= 2;
flFireRate = pSentry->m_bPlayerControlled() ? 0.09f : 0.18f;
break;
case 1:
flFireRate = pSentry->m_bPlayerControlled() ? 0.135f : 0.225f;
break;
default:
flFireRate = pSentry->m_bPlayerControlled() ? 0.09f : 0.135f;
}
int iShotsWithinTime = GetShotsWithinTime(0, flFireRate, 1.f /*flLatency*/);
flMult = flBulletResist > 0.f ? 1.f - flBulletResist : flMult + flBulletResist;
flDamage *= flMult;
float flDamageInLatency = flDamage * iShotsWithinTime;
float flDamageDanger = flDamageInLatency / iPlayerHealth;
float flDistanceDanger = Math::RemapVal(flDistance, 1100.f, 3200.f, 1.f, 0.001f);
//SDK::Output("Sentry", std::format("{}, {}, {}, {}", flDamage, flDamageInLatency, flDamageDanger, flDistanceDanger).c_str(), { 255, 200, 200 }, Vars::Debug::Logging.Value);
flBulletDanger += flDamageDanger * flDistanceDanger;
}
for (auto pEntity : H::Entities.GetGroup(EGroupType::WORLD_PROJECTILES))
{
CTFPlayer* pOwner = nullptr;
CTFWeaponBase* pWeapon = nullptr;
switch (pEntity->GetClassID())
{
case ETFClassID::CTFGrenadePipebombProjectile:
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
case ETFClassID::CTFProjectile_SpellMeteorShower:
pWeapon = pEntity->As<CTFGrenadePipebombProjectile>()->m_hOriginalLauncher().Get()->As<CTFWeaponBase>();
pOwner = pEntity->As<CTFWeaponBaseGrenadeProj>()->m_hThrower().Get()->As<CTFPlayer>();
break;
case ETFClassID::CTFProjectile_Arrow:
case ETFClassID::CTFProjectile_HealingBolt:
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_SentryRocket:
case ETFClassID::CTFProjectile_BallOfFire:
case ETFClassID::CTFProjectile_SpellFireball:
case ETFClassID::CTFProjectile_SpellLightningOrb:
case ETFClassID::CTFProjectile_EnergyBall:
case ETFClassID::CTFProjectile_Flare:
pWeapon = pEntity->As<CTFBaseRocket>()->m_hLauncher().Get()->As<CTFWeaponBase>();
pOwner = pWeapon ? pWeapon->m_hOwner().Get()->As<CTFPlayer>() : nullptr;
break;
case ETFClassID::CTFProjectile_EnergyRing:
pWeapon = pEntity->As<CTFBaseProjectile>()->m_hLauncher().Get()->As<CTFWeaponBase>();
pOwner = pWeapon ? pWeapon->m_hOwner().Get()->As<CTFPlayer>() : nullptr;
}
if (!pOwner || pOwner->m_iTeamNum() == pTarget->m_iTeamNum() || pWeapon && !pWeapon->GetDamage())
continue;
Vec3 vVelocity = pEntity->GetAbsVelocity();
float flRadius = 0.f;
switch (pEntity->GetClassID())
{
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_SentryRocket:
case ETFClassID::CTFProjectile_EnergyBall:
vVelocity = pEntity->As<CTFProjectile_Rocket>()->m_vInitialVelocity();
[[fallthrough]];
case ETFClassID::CTFGrenadePipebombProjectile:
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
flRadius = 146.f;
break;
case ETFClassID::CTFProjectile_Flare:
flRadius = 110.f;
}
if (pOwner && pWeapon && flRadius)
{
flRadius = SDK::AttribHookValue(flRadius, "mult_explosion_radius", pWeapon);
switch (pWeapon->GetWeaponID())
{
case TF_WEAPON_ROCKETLAUNCHER:
case TF_WEAPON_ROCKETLAUNCHER_DIRECTHIT:
case TF_WEAPON_PARTICLE_CANNON:
if (pOwner->InCond(TF_COND_BLASTJUMPING) && SDK::AttribHookValue(1.f, "rocketjump_attackrate_bonus", pWeapon) != 1.f)
flRadius *= 0.8f;
}
}
Vec3 vProjectileOrigin = PredictOrigin(pEntity->m_vecOrigin(), vVelocity, flLatency, true, pEntity->m_vecMins(), pEntity->m_vecMaxs());
if (!TraceToEntity(pTarget, pEntity, vTargetEye, vProjectileOrigin, MASK_SHOT))
continue;
int iType = MEDIGUN_BLAST_RESIST;
float flDamage = 100.f, flMult = pTarget->IsMarked() ? 1.36f : 1.f;
switch (pEntity->GetClassID())
{
case ETFClassID::CTFGrenadePipebombProjectile:
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
case ETFClassID::CTFProjectile_SpellMeteorShower:
if (pEntity->As<CTFWeaponBaseGrenadeProj>()->m_bCritical())
flMult = 3.f;
else if (pEntity->As<CTFWeaponBaseGrenadeProj>()->m_iDeflected() && (pEntity->GetClassID() != ETFClassID::CTFGrenadePipebombProjectile || !pEntity->GetAbsVelocity().IsZero()))
flMult = 1.36f;
break;
case ETFClassID::CTFProjectile_Arrow:
if (pEntity->As<CTFProjectile_Arrow>()->m_iProjectileType() == TF_PROJECTILE_ARROW)
{
flMult = 3.f;
break;
}
[[fallthrough]];
case ETFClassID::CTFProjectile_HealingBolt:
if (pEntity->As<CTFProjectile_Arrow>()->m_bCritical())
flMult = 3.f;
else if (pEntity->As<CTFBaseRocket>()->m_iDeflected())
flMult = 1.36f;
break;
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_BallOfFire:
case ETFClassID::CTFProjectile_SentryRocket:
case ETFClassID::CTFProjectile_SpellFireball:
case ETFClassID::CTFProjectile_SpellLightningOrb:
if (pEntity->As<CTFProjectile_Rocket>()->m_bCritical())
flMult = 3.f;
else if (pEntity->As<CTFBaseRocket>()->m_iDeflected())
flMult = 1.36f;
break;
case ETFClassID::CTFProjectile_EnergyBall:
if (pEntity->As<CTFProjectile_EnergyBall>()->m_bChargedShot())
flMult = 2.f; // whatever
else if (pEntity->As<CTFBaseRocket>()->m_iDeflected())
flMult = 1.36f;
break;
case ETFClassID::CTFProjectile_Flare:
if (pEntity->As<CTFProjectile_Flare>()->m_bCritical() || pTarget->InCond(TF_COND_BURNING) || pTarget->InCond(TF_COND_BURNING_PYRO))
flMult = 3.f;
else if (pEntity->As<CTFBaseRocket>()->m_iDeflected())
flMult = 1.36f;
}
switch (pEntity->GetClassID())
{
case ETFClassID::CTFGrenadePipebombProjectile:
flDamage = 100.f;
break;
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
flDamage = 50.f;
break;
case ETFClassID::CTFProjectile_SpellMeteorShower:
flDamage = 100.f;
iType = MEDIGUN_FIRE_RESIST;
break;
case ETFClassID::CTFProjectile_Arrow:
flDamage = pEntity->As<CTFProjectile_Arrow>()->m_iProjectileType() == TF_PROJECTILE_ARROW
? Math::RemapVal(pEntity->As<CTFProjectile_Arrow>()->m_vInitialVelocity().Length(), 1800.f, 2600.f, 50.f, 120.f)
: 40.f;
iType = MEDIGUN_BULLET_RESIST;
break;
case ETFClassID::CTFProjectile_HealingBolt:
flDamage = Math::RemapVal(pOwner->m_vecOrigin().DistTo(vProjectileOrigin), 200.f, 1600.f, 38.f, 75.f);
iType = MEDIGUN_BULLET_RESIST;
break;
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_EnergyBall:
flDamage = flMult ? 90.f : Math::RemapVal(pOwner->m_vecOrigin().DistTo(vProjectileOrigin), 500.f, 920.f, 90.f, 48.f);
break;
case ETFClassID::CTFProjectile_SentryRocket:
flDamage = flMult ? 100.f : Math::RemapVal(pOwner->m_vecOrigin().DistTo(vProjectileOrigin), 100.f, 920.f, 100.f, 50.f);
break;
case ETFClassID::CTFProjectile_BallOfFire:
flDamage = pTarget->InCond(TF_COND_BURNING) || pTarget->InCond(TF_COND_BURNING_PYRO) ? 90.f : 30.f;
iType = MEDIGUN_FIRE_RESIST;
break;
case ETFClassID::CTFProjectile_SpellFireball:
flDamage = 100.f;
iType = MEDIGUN_FIRE_RESIST;
break;
case ETFClassID::CTFProjectile_SpellLightningOrb:
flDamage = 100.f;
iType = MEDIGUN_FIRE_RESIST;
break;
case ETFClassID::CTFProjectile_Flare:
flDamage = 30.f;
iType = MEDIGUN_FIRE_RESIST;
break;
case ETFClassID::CTFProjectile_EnergyRing:
flDamage = 60.f;
iType = MEDIGUN_BULLET_RESIST;
}
switch (iType)
{
case MEDIGUN_BULLET_RESIST: flMult = flBulletResist > 0.f ? 1.f - flBulletResist : flMult + flBulletResist; break;
case MEDIGUN_BLAST_RESIST: flMult = flBlastResist > 0.f ? 1.f - flBlastResist : flMult + flBlastResist; break;
case MEDIGUN_FIRE_RESIST: flMult = flFireResist > 0.f ? 1.f - flFireResist : flMult + flFireResist; break;
}
flDamage *= flMult * (pWeapon ? SDK::AttribHookValue(1.f, "mult_dmg", pWeapon) : 1);
flRadius += vVelocity.Length() * flLatency + pTarget->GetSize().Length() / 2;
float flDamageDanger = flDamage / iPlayerHealth;
float flDistanceDanger = Math::RemapVal(pTarget->m_vecOrigin().DistTo(vProjectileOrigin), flRadius, flRadius, 1.f, 0.001f);
//G::SphereStorage.emplace_back(vProjectileOrigin, flRadius, 36, 36, I::GlobalVars->curtime + 60.f, Color_t(255, 255, 255, 1), Color_t(0, 0, 0, 0), true);
//SDK::Output(std::format("Projectile {}", iType).c_str(), std::format("{}, {}, {}", flDamage, flDamageDanger, flDistanceDanger).c_str(), { 255, 200, 200 }, Vars::Debug::Logging.Value);
switch (iType)
{
case MEDIGUN_BULLET_RESIST:
flBulletDanger += flDamageDanger * flDistanceDanger;
break;
case MEDIGUN_BLAST_RESIST:
flBlastDanger += flDamageDanger * flDistanceDanger;
break;
case MEDIGUN_FIRE_RESIST:
flFireDanger += flDamageDanger * flDistanceDanger;
}
}
if (m_flDamagedTime <= TICK_INTERVAL)
{
if (pTarget->InCond(TF_COND_BURNING) || pTarget->InCond(TF_COND_BURNING_PYRO))
{
m_flDamagedTime = TICK_INTERVAL * 2;
m_iDamagedType = MEDIGUN_FIRE_RESIST;
m_flDamagedDPS = 8.f;
}
}
if (m_flDamagedTime = std::max(m_flDamagedTime - TICK_INTERVAL, 0.f))
{
switch (m_iDamagedType)
{
case MEDIGUN_BULLET_RESIST:
flBulletDanger += m_flDamagedDPS / iPlayerHealth;
break;
case MEDIGUN_BLAST_RESIST:
flBlastDanger += m_flDamagedDPS / iPlayerHealth;
break;
case MEDIGUN_FIRE_RESIST:
flFireDanger += m_flDamagedDPS / iPlayerHealth;
}
}
// ignore resistances we are already charged with, else scale
if (flBulletResist >= (bVaccinator ? 0.75f : 1.f))
flBulletDanger = 0.f;
else
flBulletDanger *= Vars::Aimbot::Healing::AutoVaccinatorBulletScale.Value / 100.f;
if (flBlastResist >= (bVaccinator ? 0.75f : 1.f))
flBlastDanger = 0.f;
else
flBlastDanger *= Vars::Aimbot::Healing::AutoVaccinatorBlastScale.Value / 100.f;
if (flFireResist >= (bVaccinator ? 0.75f : 1.f))
flFireDanger = 0.f;
else
flFireDanger *= Vars::Aimbot::Healing::AutoVaccinatorFireScale.Value / 100.f;
flBulletOut = std::max(flBulletOut, flBulletDanger);
flBlastOut = std::max(flBlastOut, flBlastDanger);
flFireOut = std::max(flFireOut, flFireDanger);
}
void CAutoHeal::SwapResistType(CUserCmd* pCmd, int iType)
{
if (m_iResistType != iType && !(G::LastUserCmd->buttons & IN_RELOAD))
pCmd->buttons |= IN_RELOAD;
}
void CAutoHeal::ActivateResistType(CUserCmd* pCmd, int iType)
{
if (m_flChargeLevel >= 0.25f && m_iResistType == iType)
pCmd->buttons |= IN_ATTACK2;
}
void CAutoHeal::AutoVaccinator(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd)
{
if (!Vars::Aimbot::Healing::AutoVaccinator.Value || pWeapon->GetMedigunType() != MEDIGUN_RESIST)
return;
//G::LineStorage.clear();
//G::SweptStorage.clear();
//G::SphereStorage.clear();
if (m_iResistType == -1)
m_iResistType = pWeapon->GetResistType();
std::vector<std::pair<float, int>> vResistDangers = {
{ 0.f, MEDIGUN_BULLET_RESIST },
{ 0.f, MEDIGUN_BLAST_RESIST },
{ 0.f, MEDIGUN_FIRE_RESIST }
};
GetDangers(pLocal, true, vResistDangers[MEDIGUN_BULLET_RESIST].first, vResistDangers[MEDIGUN_BLAST_RESIST].first, vResistDangers[MEDIGUN_FIRE_RESIST].first);
auto pTarget = pWeapon->m_hHealingTarget().Get()->As<CTFPlayer>();
if (pTarget && (!Vars::Aimbot::Healing::FriendsOnly.Value || H::Entities.IsFriend(pTarget->entindex()) || H::Entities.InParty(pTarget->entindex())))
GetDangers(pTarget, true, vResistDangers[MEDIGUN_BULLET_RESIST].first, vResistDangers[MEDIGUN_BLAST_RESIST].first, vResistDangers[MEDIGUN_FIRE_RESIST].first);
std::sort(vResistDangers.begin(), vResistDangers.end(), [&](const std::pair<float, int>& a, const std::pair<float, int>& b) -> bool
{
return a.first > b.first;
});
int iTargetResist = vResistDangers.front().second;
float flTargetDanger = vResistDangers.front().first;
if (flTargetDanger)
SwapResistType(pCmd, iTargetResist);
if (flTargetDanger >= 1.f)
ActivateResistType(pCmd, iTargetResist);
if (m_bPreventResistSwap)
pCmd->buttons &= ~IN_RELOAD;
if (m_bPreventResistCharge)
pCmd->buttons &= ~IN_ATTACK2;
if (pCmd->buttons & IN_RELOAD && !(G::LastUserCmd->buttons & IN_RELOAD))
{
m_iResistType = (m_iResistType + 1) % 3;
m_flSwapTime = I::GlobalVars->curtime + F::Backtrack.GetReal(MAX_FLOWS, false) * 1.5f + 0.1f;
}
if (m_flSwapTime < I::GlobalVars->curtime)
m_iResistType = pWeapon->GetResistType();
m_flChargeLevel = pWeapon->m_flChargeLevel();
}
void CAutoHeal::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
{
bool bActivated = ActivateOnVoice(pLocal, pWeapon->As<CWeaponMedigun>(), pCmd);
m_mMedicCallers.clear();
if (bActivated)
if (pWeapon->GetWeaponID() != TF_WEAPON_MEDIGUN)
{
m_mMedicCallers.clear();
m_iResistType = -1;
return;
}
}
ActivateOnVoice(pLocal, pWeapon->As<CWeaponMedigun>(), pCmd);
m_mMedicCallers.clear();
AutoVaccinator(pLocal, pWeapon->As<CWeaponMedigun>(), pCmd);
}
void CAutoHeal::Event(IGameEvent* pEvent, uint32_t uHash)
{
switch (uHash)
{
case FNV1A::Hash32Const("player_hurt"):
{
if (!Vars::Aimbot::Healing::AutoVaccinator.Value)
return;
auto pWeapon = H::Entities.GetWeapon()->As<CWeaponMedigun>();
if (!pWeapon
|| pWeapon->GetWeaponID() != TF_WEAPON_MEDIGUN || pWeapon->GetMedigunType() != MEDIGUN_RESIST)
return;
int iVictim = I::EngineClient->GetPlayerForUserID(pEvent->GetInt("userid"));
int iAttacker = I::EngineClient->GetPlayerForUserID(pEvent->GetInt("attacker"));
int iDamage = pEvent->GetInt("damageamount");
int iWeaponID = pEvent->GetInt("weaponid");
bool bCrit = pEvent->GetBool("crit");
bool bMinicrit = pEvent->GetBool("minicrit");
int iTarget = pWeapon->m_hHealingTarget().GetIndex();
if (iVictim == iAttacker || iVictim != I::EngineClient->GetLocalPlayer() && (iVictim != iTarget || Vars::Aimbot::Healing::FriendsOnly.Value && !H::Entities.IsFriend(iTarget) && !H::Entities.InParty(iTarget)))
return;
auto pEntity = I::ClientEntityList->GetClientEntity(iAttacker)->As<CTFPlayer>();
if (!pEntity || !pEntity->IsPlayer())
return;
auto pWeapon2 = pEntity->m_hActiveWeapon().Get()->As<CTFWeaponBase>();
if (!pWeapon2 || pWeapon2->GetWeaponID() != iWeaponID || pWeapon2->GetFireRate() > 1.f)
return;
float flFireRate = pWeapon2->GetFireRate();
float flMult = SDK::AttribHookValue(1, "mult_dmg", pWeapon2);
switch (SDK::GetWeaponType(pWeapon2))
{
case EWeaponType::HITSCAN:
m_iDamagedType = MEDIGUN_BULLET_RESIST;
m_flDamagedDPS = iDamage / flFireRate;
break;
case EWeaponType::PROJECTILE:
switch (iWeaponID)
{
case TF_WEAPON_FLAMETHROWER:
if (!bCrit && !bMinicrit || iDamage / flMult < (bCrit ? 48 : 22))
{
m_iDamagedType = MEDIGUN_FIRE_RESIST;
float flBurnMult = SDK::AttribHookValue(1, "mult_wpn_burndmg", pWeapon2);
if (!bCrit && !bMinicrit && iDamage <= 4 * flBurnMult)
m_flDamagedDPS = 8.f * flBurnMult;
else
m_flDamagedDPS = 80.f * flMult * (bCrit ? 3.f : bMinicrit ? 1.36f : 1.f);
}
else // better way to assume reflect?
{
m_iDamagedType = MEDIGUN_BLAST_RESIST;
m_flDamagedDPS = iDamage;
}
break;
case TF_WEAPON_COMPOUND_BOW:
case TF_WEAPON_CROSSBOW:
case TF_WEAPON_SHOTGUN_BUILDING_RESCUE:
case TF_WEAPON_SYRINGEGUN_MEDIC:
case TF_WEAPON_RAYGUN:
m_iDamagedType = MEDIGUN_BULLET_RESIST;
m_flDamagedDPS = iDamage / flFireRate;
break;
case TF_WEAPON_FLAME_BALL:
m_iDamagedType = MEDIGUN_FIRE_RESIST;
m_flDamagedDPS = iDamage / flFireRate;
break;
default:
m_iDamagedType = MEDIGUN_BLAST_RESIST;
m_flDamagedDPS = iDamage / flFireRate;
}
break;
case EWeaponType::MELEE:
return;
}
m_flDamagedTime = 1.f;
//SDK::Output("Hurt", std::format("{}, {}", m_iDamagedType, m_flDamagedDPS).c_str(), { 255, 100, 100 });
break;
}
case FNV1A::Hash32Const("player_spawn"):
m_flDamagedTime = 0.f;
}
}
/*
void CAutoHeal::Draw(CTFPlayer* pLocal)
{
auto pWeapon = H::Entities.GetWeapon()->As<CWeaponMedigun>();
if (!pWeapon || pWeapon->GetWeaponID() != TF_WEAPON_MEDIGUN
|| !Vars::Aimbot::Healing::AutoVaccinator.Value || pWeapon->GetMedigunType() != MEDIGUN_RESIST)
return;
int x = H::Draw.m_nScreenW / 2, y = 100;
const auto& fFont = H::Fonts.GetFont(FONT_INDICATORS);
const int nTall = fFont.m_nTall + H::Draw.Scale(1);
y -= nTall;
for (auto& [flDanger, iResist] : vResistDangers)
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, ALIGN_TOP, std::format("{}: {:.3f}", iResist == MEDIGUN_BULLET_RESIST ? "Bullet" : iResist == MEDIGUN_BLAST_RESIST ? "Blast" : "Fire", flDanger).c_str());
}
*/
@@ -3,12 +3,30 @@
class CAutoHeal
{
bool ActivateOnVoice(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd);
void ActivateOnVoice(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd);
void AutoVaccinator(CTFPlayer* pLocal, CWeaponMedigun* pWeapon, CUserCmd* pCmd);
void GetDangers(CTFPlayer* pTarget, bool bVaccinator, float& flBulletDanger, float& flBlastDanger, float& flFireDanger);
void SwapResistType(CUserCmd* pCmd, int iType);
void ActivateResistType(CUserCmd* pCmd, int iType);
int m_iResistType = -1;
float m_flChargeLevel = 0.f;
float m_flSwapTime = 0.f;
bool m_bPreventResistSwap = false;
bool m_bPreventResistCharge = false;
int m_iDamagedType = -1;
float m_flDamagedDPS = -1;
float m_flDamagedTime = 0.f;
//std::vector<std::pair<float, int>> vResistDangers = {};
public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
void Event(IGameEvent* pEvent, uint32_t uHash);
//void Draw(CTFPlayer* pLocal);
std::unordered_map<int, bool> m_mMedicCallers = {};
};
ADD_FEATURE(CAutoHeal, AutoHeal)
ADD_FEATURE(CAutoHeal, AutoHeal);
@@ -102,7 +102,7 @@ bool CAutoRocketJump::SetAngles(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUser
void CAutoRocketJump::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
{
if (!pLocal || !pWeapon || !pCmd || !pLocal->IsAlive() || pLocal->IsAGhost() || I::EngineVGui->IsGameUIVisible())
if (!pLocal || !pWeapon || !pLocal->IsAlive() || pLocal->IsAGhost() || I::EngineVGui->IsGameUIVisible())
{
m_iFrame = -1;
return;
@@ -16,4 +16,4 @@ public:
bool IsRunning() { return m_bRunning; }
};
ADD_FEATURE(CAutoRocketJump, AutoRocketJump)
ADD_FEATURE(CAutoRocketJump, AutoRocketJump);
+2 -2
View File
@@ -137,7 +137,7 @@ std::vector<TickRecord*> CBacktrack::GetValidRecords(std::vector<TickRecord*>& v
float flCorrect = std::clamp(GetReal(MAX_FLOWS, false) + ROUND_TO_TICKS(GetFakeInterp()), 0.f, m_flMaxUnlag);
int iServerTick = m_iTickCount + GetAnticipatedChoke() + Vars::Backtrack::Offset.Value + TIME_TO_TICKS(GetReal(FLOW_OUTGOING));
if (!Vars::Misc::Game::AntiCheatCompatibility.Value)
if (!Vars::Misc::Game::AntiCheatCompatibility.Value && Vars::Backtrack::Window.Value)
{
for (auto pRecord : vRecords)
{
@@ -421,5 +421,5 @@ void CBacktrack::Draw(CTFPlayer* pLocal)
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Ping {:.0f} (+ {:.0f}) ms", flLatency, flFake).c_str());
else
H::Draw.StringOutlined(fFont, x, y, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Ping {:.0f} ms", flLatency).c_str());
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, "Scoreboard %d ms", iLatencyScoreboard);
H::Draw.StringOutlined(fFont, x, y += nTall, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value, align, std::format("Scoreboard {} ms", iLatencyScoreboard).c_str());
}
+1 -1
View File
@@ -80,4 +80,4 @@ public:
TickRecord m_tRecord = {}; // for temporary use
};
ADD_FEATURE(CBacktrack, Backtrack)
ADD_FEATURE(CBacktrack, Backtrack);
+1 -1
View File
@@ -45,4 +45,4 @@ public:
std::vector<Bind_t> m_vBinds = {};
};
ADD_FEATURE(CBinds, Binds)
ADD_FEATURE(CBinds, Binds);
@@ -52,4 +52,4 @@ public:
void Reset();
};
ADD_FEATURE(CCheaterDetection, CheaterDetection)
ADD_FEATURE(CCheaterDetection, CheaterDetection);
+1 -1
View File
@@ -15,4 +15,4 @@ public:
void Register(const std::string& sName, CommandCallback fCallback);
};
ADD_FEATURE(CCommands, Commands)
ADD_FEATURE(CCommands, Commands);
+19 -8
View File
@@ -349,6 +349,22 @@ void CCritHack::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
}
else if (pWeapon->GetWeaponID() == TF_WEAPON_MINIGUN && !(G::LastUserCmd->buttons & IN_ATTACK))
bAttacking = false;
else if (!bAttacking)
{
switch (pWeapon->GetWeaponID())
{
case TF_WEAPON_ROCKETLAUNCHER:
case TF_WEAPON_ROCKETLAUNCHER_DIRECTHIT:
if (pWeapon->IsInReload() && G::CanPrimaryAttack && SDK::AttribHookValue(0, "can_overload", pWeapon))
{
int iClip1 = pWeapon->m_iClip1();
if (pWeapon->m_bRemoveable() && iClip1 > 0)
bAttacking = true;
else if (iClip1 >= pWeapon->GetMaxClip1() || iClip1 > 0 && pLocal->GetAmmoCount(pWeapon->m_iPrimaryAmmoType()) == 0)
bAttacking = true;
}
}
}
bool bRapidFire = pWeapon->IsRapidFire();
bool bStreamWait = bRapidFire && TICKS_TO_TIME(pLocal->m_nTickBase()) < pWeapon->m_flLastRapidFireCritCheckTime() + 1.f;
@@ -419,9 +435,9 @@ int CCritHack::PredictCmdNum(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd
return pCmd->command_number;
}
bool CCritHack::CalcIsAttackCriticalHandler(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
bool CCritHack::CalcIsAttackCriticalHandler()
{
if (!I::Prediction->m_bFirstTimePredicted || !pLocal || !pWeapon)
if (!I::Prediction->m_bFirstTimePredicted)
return false;
if (m_iWishRandomSeed)
@@ -449,11 +465,6 @@ void CCritHack::Event(IGameEvent* pEvent, uint32_t uHash, CTFPlayer* pLocal)
int iHealth = pEvent->GetInt("health");
int iWeaponID = pEvent->GetInt("weaponid");
int iCustom = pEvent->GetInt("custom");
bool bShowDisguisedCrit = pEvent->GetBool("showdisguisedcrit");
bool bAllSeeCrit = pEvent->GetBool("allseecrit");
byte iBonusEffect = pEvent->GetInt("bonuseffect");
if (m_mHealthHistory.contains(iVictim))
{
auto& tHistory = m_mHealthHistory[iVictim];
@@ -479,7 +490,7 @@ void CCritHack::Event(IGameEvent* pEvent, uint32_t uHash, CTFPlayer* pLocal)
if (iHealth)
StoreHealthHistory(iVictim, iHealth);
if (iVictim == iAttacker || iAttacker != pLocal->entindex())
if (iVictim == iAttacker || iAttacker != I::EngineClient->GetLocalPlayer())
break;
if (auto pGameRules = I::TFGameRules())
+4 -3
View File
@@ -45,7 +45,6 @@ private:
void GetTotalCrits(CTFPlayer* pLocal, CTFWeaponBase* pWeapon);
void CanFireCritical(CTFPlayer* pLocal, CTFWeaponBase* pWeapon);
bool WeaponCanCrit(CTFWeaponBase* pWeapon, bool bWeaponOnly = false);
void ResetWeapons(CTFPlayer* pLocal);
void Reset();
@@ -69,13 +68,15 @@ private:
public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
bool CalcIsAttackCriticalHandler(CTFPlayer* pLocal, CTFWeaponBase* pWeapon);
bool CalcIsAttackCriticalHandler();
void Event(IGameEvent* pEvent, uint32_t uHash, CTFPlayer* pLocal);
void Store();
void Draw(CTFPlayer* pLocal);
bool WeaponCanCrit(CTFWeaponBase* pWeapon, bool bWeaponOnly = false);
int PredictCmdNum(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
std::unordered_map<int, WeaponStorage_t> m_mStorage = {};
};
ADD_FEATURE(CCritHack, CritHack)
ADD_FEATURE(CCritHack, CritHack);
@@ -38,7 +38,7 @@ void CEnginePrediction::Simulate(CTFPlayer* pLocal, CUserCmd* pCmd)
const bool bOldInPrediction = I::Prediction->m_bInPrediction;
I::MoveHelper->SetHost(pLocal);
pLocal->SetCurrentCmd(pCmd);
pLocal->m_pCurrentCommand() = pCmd;
*G::RandomSeed() = MD5_PseudoRandom(pCmd->command_number) & std::numeric_limits<int>::max();
I::Prediction->m_bFirstTimePredicted = false;
@@ -72,7 +72,7 @@ void CEnginePrediction::Simulate(CTFPlayer* pLocal, CUserCmd* pCmd)
}
I::MoveHelper->SetHost(nullptr);
pLocal->SetCurrentCmd(nullptr);
pLocal->m_pCurrentCommand() = nullptr;
*G::RandomSeed() = -1;
pLocal->m_nTickBase() = nOldTickBase;
@@ -41,4 +41,4 @@ public:
Vec3 m_vAngles = {};
};
ADD_FEATURE(CEnginePrediction, EnginePrediction)
ADD_FEATURE(CEnginePrediction, EnginePrediction);
+2 -2
View File
@@ -525,13 +525,13 @@ namespace ImGui
PopStyleVar();
}
inline bool FInputText(const char* sLabel, std::string& sText, int iFlags = ImGuiInputTextFlags_None, float flWidth = H::Draw.Scale(150))
inline bool FInputText(const char* sLabel, std::string& sText, float flWidth = H::Draw.Scale(150), int iFlags = ImGuiInputTextFlags_None, ImGuiInputTextCallback fCallback = nullptr)
{
PushStyleVar(ImGuiStyleVar_FramePadding, { H::Draw.Scale(8), H::Draw.Scale(8) });
PushItemWidth(flWidth);
ImVec2 vDrawPos = GetCursorPos() + GetDrawPos();
bool bReturn = InputText(std::format("##{}", sLabel).c_str(), &sText, iFlags | ImGuiInputTextFlags_NoKeyboardNavigate);
bool bReturn = InputText(std::format("##{}", sLabel).c_str(), &sText, iFlags | ImGuiInputTextFlags_NoKeyboardNavigate, fCallback);
ImVec2 vSize = GetItemRectSize();
float flInset = H::Draw.Scale(0.5f) - 0.5f;
GetWindowDrawList()->AddRect({ vDrawPos.x + flInset, vDrawPos.y + flInset }, { vDrawPos.x - flInset + vSize.x, vDrawPos.y - flInset + vSize.y }, F::Render.Background2, H::Draw.Scale(4), ImDrawFlags_None, H::Draw.Scale());
+102 -82
View File
@@ -91,7 +91,7 @@ void CMenu::DrawMenu()
static std::string sSearch = "";
SetCursorPos({ H::Draw.Scale(8), vWindowSize.y - H::Draw.Scale(37) });
FInputText("Search...", sSearch, ImGuiInputTextFlags_None, H::Draw.Scale(123));
FInputText("Search...", sSearch, H::Draw.Scale(123), ImGuiInputTextFlags_None);
bool bSearch = /*IsItemFocused() ||*/ !sSearch.empty();
if (!bSearch || FCalcTextSize(sSearch.c_str()).x < 86.f)
{
@@ -200,8 +200,18 @@ void CMenu::MenuAimbot(int iTab)
{
FToggle(Vars::Aimbot::Healing::AutoHeal, FToggleEnum::Left);
FToggle(Vars::Aimbot::Healing::FriendsOnly, FToggleEnum::Right);
FToggle(Vars::Aimbot::Healing::ActivateOnVoice);
FToggle(Vars::Aimbot::Healing::AutoVaccinator, FToggleEnum::Left);
FToggle(Vars::Aimbot::Healing::ActivateOnVoice, FToggleEnum::Right);
} EndSection();
if (Vars::Debug::Options.Value)
{
if (Section("##Debug Healing"))
{
FSlider(Vars::Aimbot::Healing::AutoVaccinatorBulletScale);
FSlider(Vars::Aimbot::Healing::AutoVaccinatorBlastScale);
FSlider(Vars::Aimbot::Healing::AutoVaccinatorFireScale);
} EndSection();
}
}
/* Column 2 */
TableNextColumn();
@@ -213,7 +223,8 @@ void CMenu::MenuAimbot(int iTab)
FSlider(Vars::Aimbot::Hitscan::PointScale);
PushTransparent(!(FGet(Vars::Aimbot::Hitscan::Modifiers) & Vars::Aimbot::Hitscan::ModifiersEnum::Tapfire));
{
FSlider(Vars::Aimbot::Hitscan::TapFireDist);
//FSlider(Vars::Aimbot::Hitscan::TapFireDist);
FSlider("Tapfire distance", &Vars::Aimbot::Hitscan::TapFireDist[DEFAULT_BIND], 0.f, 1000.f);
}
PopTransparent();
} EndSection();
@@ -555,7 +566,6 @@ void CMenu::MenuAimbot(int iTab)
FSlider(Vars::Visuals::Trajectory::Hull);
FSlider(Vars::Visuals::Trajectory::Speed);
FSlider(Vars::Visuals::Trajectory::Gravity);
FToggle(Vars::Visuals::Trajectory::NoSpin);
FSlider(Vars::Visuals::Trajectory::LifeTime);
FSlider(Vars::Visuals::Trajectory::UpVelocity);
FSlider(Vars::Visuals::Trajectory::AngularVelocityX);
@@ -1432,7 +1442,8 @@ void CMenu::MenuMisc(int iTab)
FToggle(Vars::Misc::Exploits::CheatsBypass, FToggleEnum::Left);
FToggle(Vars::Misc::Exploits::PureBypass, FToggleEnum::Right);
FToggle(Vars::Misc::Exploits::EquipRegionUnlock, FToggleEnum::Left);
FToggle(Vars::Misc::Exploits::PingReducer, FToggleEnum::Right);
FToggle(Vars::Misc::Exploits::BackpackExpander, FToggleEnum::Right);
FToggle(Vars::Misc::Exploits::PingReducer);
PushTransparent(!FGet(Vars::Misc::Exploits::PingReducer));
{
FSlider(Vars::Misc::Exploits::PingTarget);
@@ -1446,8 +1457,7 @@ void CMenu::MenuMisc(int iTab)
FToggle(Vars::Misc::Automation::AntiAutobalance, FToggleEnum::Right);
FToggle(Vars::Misc::Automation::TauntControl, FToggleEnum::Left);
FToggle(Vars::Misc::Automation::KartControl, FToggleEnum::Right);
FToggle(Vars::Misc::Automation::BackpackExpander, FToggleEnum::Left);
FToggle(Vars::Misc::Automation::AcceptItemDrops, FToggleEnum::Right);
FToggle(Vars::Misc::Automation::AcceptItemDrops);
FToggle(Vars::Misc::Automation::AutoF2Ignored, FToggleEnum::Left);
FToggle(Vars::Misc::Automation::AutoF1Priority, FToggleEnum::Right);
} EndSection();
@@ -1520,18 +1530,38 @@ void CMenu::MenuLogs(int iTab)
std::lock_guard lock(F::PlayerUtils.m_mutex);
const auto& vPlayers = F::PlayerUtils.m_vPlayerCache;
auto getTeamColor = [&](int team, bool alive)
std::unordered_map<uint64_t, std::vector<const ListPlayer*>> mParties = {};
std::unordered_map<uint64_t, float> mHues = {}; // don't just shift based on party id in the case that it will be similar
for (auto& tPlayer : vPlayers)
{
if (tPlayer.m_iParty)
mParties[tPlayer.m_iParty].push_back(&tPlayer);
}
for (auto it = mParties.begin(); it != mParties.end();)
{
if (it->second.size() > 1)
it++;
else
it = mParties.erase(it);
}
{
float flParties = mParties.size() + 1 - mParties.contains(1);
int i = 0; for (auto& [iParty, _] : mParties)
mHues[iParty] = iParty != 1 ? 360 * ++i / flParties : 0;
}
auto getTeamColor = [&](int iTeam, bool bAlive)
{
switch (team)
switch (iTeam)
{
case 3: return Color_t(100, 150, 200, alive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
case 2: return Color_t(255, 100, 100, alive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
case 3: return Color_t(100, 150, 200, bAlive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
case 2: return Color_t(255, 100, 100, bAlive ? 255 : 127).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
}
return Color_t(127, 127, 127, 255).Lerp(Vars::Menu::Theme::Background.Value, 0.5f, LerpEnum::NoAlpha);
};
auto drawPlayer = [&](const ListPlayer& player, int x, int y)
auto drawPlayer = [&](const ListPlayer& tPlayer, int x, int y)
{
ImColor tColor = ColorToVec(getTeamColor(player.m_iTeam, player.m_bAlive));
ImColor tColor = ColorToVec(getTeamColor(tPlayer.m_iTeam, tPlayer.m_bAlive));
ImVec2 vOriginalPos = { !x ? GetStyle().WindowPadding.x : GetWindowWidth() / 2 + GetStyle().WindowPadding.x / 2, H::Draw.Scale(35 + 36 * y) };
@@ -1543,62 +1573,51 @@ void CMenu::MenuLogs(int iTab)
// text + icons
int lOffset = H::Draw.Scale(10);
if (player.m_bLocal)
if (tPlayer.m_bLocal)
{
lOffset = H::Draw.Scale(29);
SetCursorPos({ vOriginalPos.x + H::Draw.Scale(7), vOriginalPos.y + H::Draw.Scale(6) });
IconImage(ICON_MD_PERSON);
}
else if (F::Spectate.m_iIntendedTarget == player.m_iUserID)
else if (F::Spectate.m_iIntendedTarget == tPlayer.m_iUserID)
{
lOffset = H::Draw.Scale(29);
SetCursorPos({ vOriginalPos.x + H::Draw.Scale(7), vOriginalPos.y + H::Draw.Scale(6) });
IconImage(ICON_MD_VISIBILITY);
}
else if (player.m_bFriend)
else if (tPlayer.m_bFriend)
{
lOffset = H::Draw.Scale(29);
SetCursorPos({ vOriginalPos.x + H::Draw.Scale(7), vOriginalPos.y + H::Draw.Scale(6) });
IconImage(ICON_MD_GROUP);
}
else if (player.m_bParty)
else if (tPlayer.m_bParty)
{
lOffset = H::Draw.Scale(29);
SetCursorPos({ vOriginalPos.x + H::Draw.Scale(7), vOriginalPos.y + H::Draw.Scale(6) });
IconImage(ICON_MD_GROUPS);
}
SetCursorPos({ vOriginalPos.x + lOffset, vOriginalPos.y + H::Draw.Scale(7) });
auto sName = TruncateText(player.m_sName, flWidth / 2 - lOffset);
auto sName = TruncateText(tPlayer.m_sName, flWidth / 2 - lOffset);
FText(sName.c_str());
lOffset += FCalcTextSize(sName.c_str()).x + H::Draw.Scale(8);
// buttons
bool bClicked = false;
std::vector<const ListPlayer*> vParty = {};
if (player.m_iParty)
{
for (auto& player2 : vPlayers)
{
//if (player.m_uFriendsID == player2.m_uFriendsID)
// continue;
if (player.m_iParty == player2.m_iParty)
vParty.push_back(&player2);
}
}
if (!player.m_bFake)
if (!tPlayer.m_bFake)
{
// tag bar
SetCursorPos({ vOriginalPos.x + lOffset, vOriginalPos.y });
if (BeginChild(std::format("TagBar{}", player.m_uFriendsID).c_str(), { flWidth - lOffset - H::Draw.Scale(4), flHeight }, ImGuiWindowFlags_None, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoBackground))
if (BeginChild(std::format("TagBar{}", tPlayer.m_uFriendsID).c_str(), { flWidth - lOffset - H::Draw.Scale(4), flHeight }, ImGuiWindowFlags_None, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoBackground))
{
std::vector<PriorityLabel_t> vLabels = {};
std::vector<std::pair<PriorityLabel_t*, int>> vTags = {};
if (vParty.size() > 1)
vLabels.emplace_back("Party", F::PlayerUtils.m_vTags[F::PlayerUtils.TagToIndex(PARTY_TAG)].m_tColor.HueShift((player.m_iParty - 1) % 360));
if (player.m_bF2P)
if (mHues.contains(tPlayer.m_iParty))
vLabels.emplace_back("Party", F::PlayerUtils.m_vTags[F::PlayerUtils.TagToIndex(PARTY_TAG)].m_tColor.HueShift(mHues[tPlayer.m_iParty]));
if (tPlayer.m_bF2P)
vTags.emplace_back(&F::PlayerUtils.m_vTags[F::PlayerUtils.TagToIndex(F2P_TAG)], 0);
for (auto& iID : F::PlayerUtils.m_mPlayerTags[player.m_uFriendsID])
for (auto& iID : F::PlayerUtils.m_mPlayerTags[tPlayer.m_uFriendsID])
{
auto pTag = F::PlayerUtils.GetTag(iID);
if (pTag)
@@ -1622,7 +1641,7 @@ void CMenu::MenuLogs(int iTab)
{
SetCursorPos({ vTagPos.x + flTagWidth - H::Draw.Scale(22), vTagPos.y - H::Draw.Scale(2) });
if (IconButton(ICON_MD_CANCEL))
F::PlayerUtils.RemoveTag(player.m_uFriendsID, iID, true, player.m_sName);
F::PlayerUtils.RemoveTag(tPlayer.m_uFriendsID, iID, true, tPlayer.m_sName);
}
flTagOffset += flTagWidth + H::Draw.Scale(4);
@@ -1638,46 +1657,46 @@ void CMenu::MenuLogs(int iTab)
bClicked = IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right);
}
SetCursorPos(vOriginalPos);
Button(std::format("##{}", player.m_uFriendsID).c_str(), { flWidth, flHeight });
Button(std::format("##{}", tPlayer.m_uFriendsID).c_str(), { flWidth, flHeight });
bClicked = bClicked || IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right);
// popups
if (bClicked)
OpenPopup(std::format("Clicked{}", player.m_uFriendsID).c_str());
if (FBeginPopup(std::format("Clicked{}", player.m_uFriendsID).c_str()))
OpenPopup(std::format("Clicked{}", tPlayer.m_uFriendsID).c_str());
if (FBeginPopup(std::format("Clicked{}", tPlayer.m_uFriendsID).c_str()))
{
PushStyleVar(ImGuiStyleVar_ItemSpacing, { H::Draw.Scale(8), H::Draw.Scale(8) });
if (!player.m_bFake)
if (!tPlayer.m_bFake)
{
if (FSelectable("Profile"))
I::SteamFriends->ActivateGameOverlayToUser("steamid", CSteamID(player.m_uFriendsID, k_EUniversePublic, k_EAccountTypeIndividual));
I::SteamFriends->ActivateGameOverlayToUser("steamid", CSteamID(tPlayer.m_uFriendsID, k_EUniversePublic, k_EAccountTypeIndividual));
if (FSelectable("History"))
I::SteamFriends->ActivateGameOverlayToWebPage(std::format("https://steamhistory.net/id/{}", CSteamID(player.m_uFriendsID, k_EUniversePublic, k_EAccountTypeIndividual).ConvertToUint64()).c_str());
I::SteamFriends->ActivateGameOverlayToWebPage(std::format("https://steamhistory.net/id/{}", CSteamID(tPlayer.m_uFriendsID, k_EUniversePublic, k_EAccountTypeIndividual).ConvertToUint64()).c_str());
}
if (FSelectable(F::Spectate.m_iIntendedTarget == player.m_iUserID ? "Unspectate" : "Spectate"))
F::Spectate.SetTarget(player.m_iUserID);
if (FSelectable(F::Spectate.m_iIntendedTarget == tPlayer.m_iUserID ? "Unspectate" : "Spectate"))
F::Spectate.SetTarget(tPlayer.m_iUserID);
if (!I::EngineClient->IsPlayingDemo() && FBeginMenu("Votekick"))
{
if (FSelectable("No reason"))
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} other\"", player.m_iUserID).c_str());
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} other\"", tPlayer.m_iUserID).c_str());
if (FSelectable("Cheating"))
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} cheating\"", player.m_iUserID).c_str());
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} cheating\"", tPlayer.m_iUserID).c_str());
if (FSelectable("Idle"))
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} idle\"", player.m_iUserID).c_str());
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} idle\"", tPlayer.m_iUserID).c_str());
if (FSelectable("Scamming"))
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} scamming\"", player.m_iUserID).c_str());
I::ClientState->SendStringCmd(std::format("callvote Kick \"{} scamming\"", tPlayer.m_iUserID).c_str());
ImGui::EndMenu();
}
if (!player.m_bFake)
if (!tPlayer.m_bFake)
{
if (FBeginMenu("Add tag"))
{
@@ -1685,14 +1704,14 @@ void CMenu::MenuLogs(int iTab)
{
int iID = std::distance(F::PlayerUtils.m_vTags.begin(), it);
auto& tTag = *it;
if (!tTag.m_bAssignable || F::PlayerUtils.HasTag(player.m_uFriendsID, iID))
if (!tTag.m_bAssignable || F::PlayerUtils.HasTag(tPlayer.m_uFriendsID, iID))
continue;
auto imColor = ColorToVec(tTag.m_tColor);
PushStyleColor(ImGuiCol_Text, imColor);
imColor.x /= 3; imColor.y /= 3; imColor.z /= 3;
if (FSelectable(tTag.m_sName.c_str(), imColor))
F::PlayerUtils.AddTag(player.m_uFriendsID, iID, true, player.m_sName);
F::PlayerUtils.AddTag(tPlayer.m_uFriendsID, iID, true, tPlayer.m_sName);
PopStyleColor();
}
@@ -1701,34 +1720,34 @@ void CMenu::MenuLogs(int iTab)
if (FBeginMenu("Alias"))
{
bool bHasAlias = F::PlayerUtils.m_mPlayerAliases.contains(player.m_uFriendsID);
bool bHasAlias = F::PlayerUtils.m_mPlayerAliases.contains(tPlayer.m_uFriendsID);
static std::string sInput = "";
PushStyleVar(ImGuiStyleVar_FramePadding, { H::Draw.Scale(8), H::Draw.Scale(8) });
PushItemWidth(H::Draw.Scale(150));
bool bEnter = FInputText("Alias...", sInput, ImGuiInputTextFlags_EnterReturnsTrue);
bool bEnter = FInputText("Alias...", sInput, H::Draw.Scale(150), ImGuiInputTextFlags_EnterReturnsTrue);
if (!IsItemFocused())
sInput = bHasAlias ? F::PlayerUtils.m_mPlayerAliases[player.m_uFriendsID] : "";
sInput = bHasAlias ? F::PlayerUtils.m_mPlayerAliases[tPlayer.m_uFriendsID] : "";
PopItemWidth();
PopStyleVar();
if (bEnter)
{
if (sInput.empty() && F::PlayerUtils.m_mPlayerAliases.contains(player.m_uFriendsID))
if (sInput.empty() && bHasAlias)
{
F::Output.AliasChanged(player.m_sName, "Removed", F::PlayerUtils.m_mPlayerAliases[player.m_uFriendsID]);
F::Output.AliasChanged(tPlayer.m_sName, "Removed", F::PlayerUtils.m_mPlayerAliases[tPlayer.m_uFriendsID]);
auto it = F::PlayerUtils.m_mPlayerAliases.find(player.m_uFriendsID);
auto it = F::PlayerUtils.m_mPlayerAliases.find(tPlayer.m_uFriendsID);
if (it != F::PlayerUtils.m_mPlayerAliases.end())
F::PlayerUtils.m_mPlayerAliases.erase(it);
F::PlayerUtils.m_bSave = true;
}
else
else if (!sInput.empty())
{
F::PlayerUtils.m_mPlayerAliases[player.m_uFriendsID] = sInput;
F::PlayerUtils.m_mPlayerAliases[tPlayer.m_uFriendsID] = sInput;
F::PlayerUtils.m_bSave = true;
F::Output.AliasChanged(player.m_sName, bHasAlias ? "Changed" : "Added", sInput);
F::Output.AliasChanged(tPlayer.m_sName, bHasAlias ? "Changed" : "Added", sInput);
}
}
@@ -1736,7 +1755,7 @@ void CMenu::MenuLogs(int iTab)
}
}
if (Vars::Resolver::Enabled.Value && !player.m_bLocal)
if (Vars::Resolver::Enabled.Value && !tPlayer.m_bLocal)
{
if (FBeginMenu("Set yaw"))
{
@@ -1754,10 +1773,10 @@ void CMenu::MenuLogs(int iTab)
switch (FNV1A::Hash32(sYaw.c_str()))
{
case FNV1A::Hash32Const("Auto"):
F::Resolver.SetYaw(player.m_iUserID, 0.f, true);
F::Resolver.SetYaw(tPlayer.m_iUserID, 0.f, true);
break;
default:
F::Resolver.SetYaw(player.m_iUserID, flValue);
F::Resolver.SetYaw(tPlayer.m_iUserID, flValue);
}
}
}
@@ -1781,13 +1800,13 @@ void CMenu::MenuLogs(int iTab)
switch (FNV1A::Hash32(sPitch.c_str()))
{
case FNV1A::Hash32Const("Auto"):
F::Resolver.SetPitch(player.m_iUserID, 0.f, false, true);
F::Resolver.SetPitch(tPlayer.m_iUserID, 0.f, false, true);
break;
case FNV1A::Hash32Const("Inverse"):
F::Resolver.SetPitch(player.m_iUserID, 0.f, true);
F::Resolver.SetPitch(tPlayer.m_iUserID, 0.f, true);
break;
default:
F::Resolver.SetPitch(player.m_iUserID, flValue);
F::Resolver.SetPitch(tPlayer.m_iUserID, flValue);
}
}
}
@@ -1804,7 +1823,7 @@ void CMenu::MenuLogs(int iTab)
for (auto& [sPitch, bValue] : vPitches)
{
if (FSelectable(sPitch.c_str()))
F::Resolver.SetView(player.m_iUserID, bValue);
F::Resolver.SetView(tPlayer.m_iUserID, bValue);
}
ImGui::EndMenu();
@@ -1819,31 +1838,31 @@ void CMenu::MenuLogs(int iTab)
for (auto& [sPitch, bValue] : vPitches)
{
if (FSelectable(sPitch.c_str()))
F::Resolver.SetMinwalk(player.m_iUserID, bValue);
F::Resolver.SetMinwalk(tPlayer.m_iUserID, bValue);
}
ImGui::EndMenu();
}
}
if (vParty.size() > 1)
if (mParties.contains(tPlayer.m_iParty))
{
Divider(H::Draw.Scale(), H::Draw.Scale(1), 0);
TextColored(F::Render.Inactive.Value, "Partied:");
for (auto& pPlayer : vParty)
TextColored(F::Render.Inactive.Value, pPlayer->m_sName.c_str());
for (auto& pPlayer2 : mParties[tPlayer.m_iParty])
TextColored(F::Render.Inactive.Value, pPlayer2->m_sName.c_str());
}
if (player.m_iLevel != -2)
if (tPlayer.m_iLevel != -2)
{
Divider(H::Draw.Scale(), H::Draw.Scale(1), 0);
std::string sLevel = "T? L?";
if (player.m_iLevel != -1)
if (tPlayer.m_iLevel != -1)
{
int iTier = std::max(std::ceil(player.m_iLevel / 150.f), 1.f);
int iLevel = ((player.m_iLevel - 1) % 150) + 1;
int iTier = std::max(std::ceil(tPlayer.m_iLevel / 150.f), 1.f);
int iLevel = ((tPlayer.m_iLevel - 1) % 150) + 1;
sLevel = std::format("T{} L{}", iTier, iLevel);
}
TextColored(F::Render.Inactive.Value, sLevel.c_str());
@@ -1856,13 +1875,13 @@ void CMenu::MenuLogs(int iTab)
// display players
std::vector<ListPlayer> vBlu, vRed, vOther;
for (auto& player : vPlayers)
for (auto& tPlayer : vPlayers)
{
switch (player.m_iTeam)
switch (tPlayer.m_iTeam)
{
case 3: vBlu.push_back(player); break;
case 2: vRed.push_back(player); break;
default: vOther.push_back(player); break;
case 3: vBlu.push_back(tPlayer); break;
case 2: vRed.push_back(tPlayer); break;
default: vOther.push_back(tPlayer); break;
}
}
@@ -3376,6 +3395,8 @@ void CMenu::MenuSettings(int iTab)
G::LineStorage.clear();
G::PathStorage.clear();
G::BoxStorage.clear();
G::SphereStorage.clear();
G::SweptStorage.clear();
}
} EndSection();
}
@@ -3405,8 +3426,7 @@ void CMenu::MenuSettings(int iTab)
#ifdef DEBUG_HOOKS
if (Section("Hooks", 8))
{
int i = 0;
for (auto& pVar : G::Vars)
int i = 0; for (auto& pVar : G::Vars)
{
if (pVar->m_sName.find("Vars::Hooks::") == std::string::npos)
continue;
+5 -10
View File
@@ -46,6 +46,9 @@ void CMisc::AutoJump(CTFPlayer* pLocal, CUserCmd* pCmd)
if (!Vars::Misc::Movement::Bunnyhop.Value)
return;
if (auto pWeapon = H::Entities.GetWeapon(); pWeapon && pWeapon->GetWeaponID() == TF_WEAPON_GRAPPLINGHOOK && pWeapon->As<CTFGrapplingHook>()->m_hProjectile())
return;
static bool bStaticJump = false, bStaticGrounded = false, bLastAttempted = false;
const bool bLastJump = bStaticJump, bLastGrounded = bStaticGrounded;
const bool bCurJump = bStaticJump = pCmd->buttons & IN_JUMP, bCurGrounded = bStaticGrounded = pLocal->m_hGroundEntity();
@@ -412,14 +415,6 @@ void CMisc::Event(IGameEvent* pEvent, uint32_t uHash)
{
switch (uHash)
{
case FNV1A::Hash32Const("client_disconnect"):
case FNV1A::Hash32Const("client_beginconnect"):
case FNV1A::Hash32Const("game_newmap"):
case FNV1A::Hash32Const("teamplay_round_start"):
G::LineStorage.clear();
G::BoxStorage.clear();
G::PathStorage.clear();
break;
case FNV1A::Hash32Const("player_spawn"):
m_bPeekPlaced = false;
}
@@ -558,7 +553,7 @@ void CMisc::PingReducer()
void CMisc::UnlockAchievements()
{
const auto pAchievementMgr = reinterpret_cast<IAchievementMgr*(*)(void)>(U::Memory.GetVFunc(I::EngineClient, 114))();
const auto pAchievementMgr = reinterpret_cast<IAchievementMgr*(*)(void)>(U::Memory.GetVirtual(I::EngineClient, 114))();
if (pAchievementMgr)
{
I::SteamUserStats->RequestCurrentStats();
@@ -571,7 +566,7 @@ void CMisc::UnlockAchievements()
void CMisc::LockAchievements()
{
const auto pAchievementMgr = reinterpret_cast<IAchievementMgr*(*)(void)>(U::Memory.GetVFunc(I::EngineClient, 114))();
const auto pAchievementMgr = reinterpret_cast<IAchievementMgr*(*)(void)>(U::Memory.GetVirtual(I::EngineClient, 114))();
if (pAchievementMgr)
{
I::SteamUserStats->RequestCurrentStats();
+1 -1
View File
@@ -40,4 +40,4 @@ public:
int m_iWishUpdaterate = -1;
};
ADD_FEATURE(CMisc, Misc)
ADD_FEATURE(CMisc, Misc);
+2 -14
View File
@@ -5,22 +5,10 @@
bool CNoSpread::ShouldRun(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
{
if (!Vars::Aimbot::General::NoSpread.Value)
if (!Vars::Aimbot::General::NoSpread.Value
|| !pLocal || !pWeapon || !pLocal->CanAttack())
return false;
if (!pLocal || !pWeapon
|| !pLocal->IsAlive()
|| pLocal->IsAGhost()
|| pLocal->IsTaunting()
|| pLocal->InCond(TF_COND_STUNNED) && pLocal->m_iStunFlags() & (TF_STUN_CONTROLS | TF_STUN_LOSER_STATE)
|| pLocal->m_bFeignDeathReady()
|| pLocal->InCond(TF_COND_PHASE)
|| pLocal->InCond(TF_COND_STEALTHED)
|| pLocal->InCond(TF_COND_HALLOWEEN_KART))
{
return false;
}
return true;
}
+1 -1
View File
@@ -10,4 +10,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
};
ADD_FEATURE(CNoSpread, NoSpread)
ADD_FEATURE(CNoSpread, NoSpread);
@@ -21,10 +21,8 @@ void CNoSpreadHitscan::Reset()
bool CNoSpreadHitscan::ShouldRun(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, bool bCreateMove)
{
if (G::PrimaryWeaponType != EWeaponType::HITSCAN)
return false;
if ((bCreateMove ? pWeapon->GetWeaponSpread() : S::CTFWeaponBaseGun_GetWeaponSpread.Call<float>(pWeapon)) <= 0.f)
if (G::PrimaryWeaponType != EWeaponType::HITSCAN
|| (bCreateMove ? pWeapon->GetWeaponSpread() : S::CTFWeaponBaseGun_GetWeaponSpread.Call<float>(pWeapon)) <= 0.f)
return false;
return bCreateMove ? G::Attacking == 1 : true;
@@ -31,4 +31,4 @@ public:
float m_flMantissaStep = 0.f;
};
ADD_FEATURE(CNoSpreadHitscan, NoSpreadHitscan)
ADD_FEATURE(CNoSpreadHitscan, NoSpreadHitscan);
@@ -10,4 +10,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
};
ADD_FEATURE(CNoSpreadProjectile, NoSpreadProjectile)
ADD_FEATURE(CNoSpreadProjectile, NoSpreadProjectile);
+14 -16
View File
@@ -3,13 +3,11 @@
#include "../Visuals/Notifications/Notifications.h"
#include "../Players/PlayerUtils.h"
static std::string white = { '\x7', 'F', 'F', 'F', 'F', 'F', 'F' }; //FFFFFF
static std::string red = { '\x7', 'F', 'F', '3', 'A', '3', 'A' }; //FF3A3A
static std::string green = { '\x7', '3', 'A', 'F', 'F', '4', 'D' }; //3AFF4D
static std::string blue = { '\x7', '0', 'D', '9', '2', 'F', 'F' }; //0D92FF
static std::string yellow = { '\x7', 'C', '8', 'A', '9', '0', '0' }; //C8A900
static std::string sRed = Color_t(255, 100, 100).ToHex();
static std::string sGreen = Color_t(100, 255, 100).ToHex();
static std::string sYellow = Color_t(200, 169, 0).ToHex();
void COutput::OutputInfo(int flags, std::string sName, std::string sOutput, std::string sChat)
static inline void OutputInfo(int flags, std::string sName, std::string sOutput, std::string sChat)
{
SDK::Output(sName.c_str(), sOutput.c_str(), Vars::Menu::Theme::Accent.Value,
flags & Vars::Logging::LogToEnum::Console,
@@ -56,7 +54,7 @@ void COutput::Event(IGameEvent* pEvent, uint32_t uHash, CTFPlayer* pLocal)
auto sName = F::PlayerUtils.GetPlayerName(iIndex, pi.name);
std::string sOutput = std::format("{}{} voted {}", (bSameTeam ? "" : "[Enemy] "), (sName), (bVotedYes ? "Yes" : "No"));
std::string sChat = std::format("{}{}{}\x1 voted {}{}", (bSameTeam ? "" : "[Enemy] "), (yellow), (sName), (bVotedYes ? green : red), (bVotedYes ? "Yes" : "No"));
std::string sChat = std::format("{}{}{}\x1 voted {}{}", (bSameTeam ? "" : "[Enemy] "), (sYellow), (sName), (bVotedYes ? sGreen : sRed), (bVotedYes ? "Yes" : "No"));
OutputInfo(Vars::Logging::VoteCast::LogTo.Value, "Vote Cast", sOutput, sChat);
return;
@@ -79,7 +77,7 @@ void COutput::Event(IGameEvent* pEvent, uint32_t uHash, CTFPlayer* pLocal)
auto sName = F::PlayerUtils.GetPlayerName(iIndex, pi.name);
std::string sOutput = std::format("{}{} changed class to {}", (bSameTeam ? "" : "[Enemy] "), (sName), (SDK::GetClassByIndex(pEvent->GetInt("class"))));
std::string sChat = std::format("{}{}{}\x1 changed class to {}{}", (bSameTeam ? "" : "[Enemy] "), (yellow), (sName), (yellow), (SDK::GetClassByIndex(pEvent->GetInt("class"))));
std::string sChat = std::format("{}{}{}\x1 changed class to {}{}", (bSameTeam ? "" : "[Enemy] "), (sYellow), (sName), (sYellow), (SDK::GetClassByIndex(pEvent->GetInt("class"))));
OutputInfo(Vars::Logging::ClassChange::LogTo.Value, "Class Change", sOutput, sChat);
return;
@@ -107,7 +105,7 @@ void COutput::Event(IGameEvent* pEvent, uint32_t uHash, CTFPlayer* pLocal)
auto sName = F::PlayerUtils.GetPlayerName(iIndex, pi.name);
std::string sOutput = std::format("You hit {} for {} damage{}({} / {})", (sName), (nDamage), (bCrit ? " (crit) " : " "), (nHealth), (iMaxHealth));
std::string sChat = std::format("You hit {}{}\x1 for {}{} damage{}{}({} / {})", (yellow), (sName), (red), (nDamage), (bCrit ? " (crit) " : " "), (yellow), (nHealth), (iMaxHealth));
std::string sChat = std::format("You hit {}{}\x1 for {}{} damage{}{}({} / {})", (sYellow), (sName), (sRed), (nDamage), (bCrit ? " (crit) " : " "), (sYellow), (nHealth), (iMaxHealth));
OutputInfo(Vars::Logging::Damage::LogTo.Value, "Damage", sOutput, sChat);
return;
@@ -187,7 +185,7 @@ void COutput::UserMessage(bf_read& msgData)
auto sTargetName = F::PlayerUtils.GetPlayerName(iTarget, piTarget.name);
auto sCallerName = F::PlayerUtils.GetPlayerName(iCaller, piCaller.name);
std::string sOutput = std::format("{}{} called a vote on {}", (bSameTeam ? "" : "[Enemy] "), (sCallerName), (sTargetName));
std::string sChat = std::format("{}{}{}\x1 called a vote on {}{}", (bSameTeam ? "" : "[Enemy] "), (yellow), (sCallerName), (yellow), (sTargetName));
std::string sChat = std::format("{}{}{}\x1 called a vote on {}{}", (bSameTeam ? "" : "[Enemy] "), (sYellow), (sCallerName), (sYellow), (sTargetName));
OutputInfo(Vars::Logging::VoteStart::LogTo.Value, "Vote Start", sOutput, sChat);
}
@@ -198,7 +196,7 @@ void COutput::CheatDetection(std::string sName, std::string sAction, std::string
return;
std::string sOutput = std::format("{} {} for {}", (sName), (sAction), (sReason));
std::string sChat = std::format("{}{}\x1 {} for {}{}", (yellow), (sName), (sAction), (yellow), (sReason));
std::string sChat = std::format("{}{}\x1 {} for {}{}", (sYellow), (sName), (sAction), (sYellow), (sReason));
OutputInfo(Vars::Logging::CheatDetection::LogTo.Value, "Cheat Detection", sOutput, sChat);
}
@@ -253,7 +251,7 @@ void COutput::TagsOnJoin(std::string sName, uint32_t uFriendsID)
}
std::string sOutput = std::format("{} has the {} {}", (sName), (vColorsTags.size() == 1 ? "tag" : "tags"), (sOutputText));
std::string sChat = std::format("{}{}\x1 has the {} {}", (yellow), (sName), (vColorsTags.size() == 1 ? "tag" : "tags"), (sChatText));
std::string sChat = std::format("{}{}\x1 has the {} {}", (sYellow), (sName), (vColorsTags.size() == 1 ? "tag" : "tags"), (sChatText));
OutputInfo(Vars::Logging::Tags::LogTo.Value, "Tags", sOutput, sChat);
}
void COutput::TagsChanged(std::string sName, std::string sAction, std::string sColor, std::string sTag)
@@ -263,7 +261,7 @@ void COutput::TagsChanged(std::string sName, std::string sAction, std::string sC
auto uHash = FNV1A::Hash32(sAction.c_str());
std::string sOutput = std::format("{} tag {} {} {}", (sAction), (sTag), (uHash == FNV1A::Hash32Const("Added") ? "to" : "from"), (sName));
std::string sChat = std::format("{} tag {}{}\x1 {} {}{}", (sAction), (sColor), (sTag), (uHash == FNV1A::Hash32Const("Added") ? "to" : "from"), (yellow), (sName));
std::string sChat = std::format("{} tag {}{}\x1 {} {}{}", (sAction), (sColor), (sTag), (uHash == FNV1A::Hash32Const("Added") ? "to" : "from"), (sYellow), (sName));
OutputInfo(Vars::Logging::Tags::LogTo.Value, "Tags", sOutput, sChat);
}
@@ -279,7 +277,7 @@ void COutput::AliasOnJoin(std::string sName, uint32_t uFriendsID)
auto& sAlias = F::PlayerUtils.m_mPlayerAliases[uFriendsID];
std::string sOutput = std::format("{} has the alias \"{}\"", (sName), (sAlias));
std::string sChat = std::format("{}{}\x1 has the alias \"{}{}\x1\"", (yellow), (sName), (yellow), (sAlias));
std::string sChat = std::format("{}{}\x1 has the alias \"{}{}\x1\"", (sYellow), (sName), (sYellow), (sAlias));
OutputInfo(Vars::Logging::Tags::LogTo.Value, "Aliases", sOutput, sChat);
}
void COutput::AliasChanged(std::string sName, std::string sAction, std::string sAlias)
@@ -289,7 +287,7 @@ void COutput::AliasChanged(std::string sName, std::string sAction, std::string s
auto uHash = FNV1A::Hash32(sAction.c_str());
std::string sOutput = std::format("{} {}'s alias {} \"{}\"", (sAction), (sName), (uHash == FNV1A::Hash32Const("Changed") ? "to" : "of"), (sAlias));
std::string sChat = std::format("{} {}{}\x1's alias {} \"{}{}\x1\"", (sAction), (yellow), (sName), (uHash == FNV1A::Hash32Const("Changed") ? "to" : "of"), (yellow), (sAlias));
std::string sChat = std::format("{} {}{}\x1's alias {} \"{}{}\x1\"", (sAction), (sYellow), (sName), (uHash == FNV1A::Hash32Const("Changed") ? "to" : "of"), (sYellow), (sAlias));
OutputInfo(Vars::Logging::Tags::LogTo.Value, "Aliases", sOutput, sChat);
}
@@ -312,7 +310,7 @@ void COutput::ReportResolver(int iIndex, std::string sAction, std::string sAxis,
auto sName = F::PlayerUtils.GetPlayerName(iIndex, pi.name);
std::string sOutput = std::format("{} {} of {} to {}", (sAction), (sAxis), (sName), (sValue));
std::string sChat = std::format("{} {}{}\x1 of {}{}\x1 to {}{}\x1", (sAction), (yellow), (sAxis), (yellow), (sName), (yellow), (sValue));
std::string sChat = std::format("{} {}{}\x1 of {}{}\x1 to {}{}\x1", (sAction), (sYellow), (sAxis), (sYellow), (sName), (sYellow), (sValue));
OutputInfo(Vars::Logging::Tags::LogTo.Value, "Resolver", sOutput, sChat);
}
void COutput::ReportResolver(std::string sMessage)
+1 -3
View File
@@ -3,8 +3,6 @@
class COutput
{
void OutputInfo(int flags, std::string sName, std::string sOutput, std::string sChat);
bool m_bInfoOnJoin = false;
public:
@@ -24,4 +22,4 @@ public:
void AliasOnJoin(std::string sName, uint32_t uFriendsID);
};
ADD_FEATURE(COutput, Output)
ADD_FEATURE(COutput, Output);
@@ -44,11 +44,18 @@ bool CAntiAim::ShouldRun(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pC
void CAntiAim::FakeShotAngles(CTFPlayer* pLocal, CUserCmd* pCmd)
void CAntiAim::FakeShotAngles(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd)
{
if (!Vars::AntiAim::InvalidShootPitch.Value || G::Attacking != 1 || G::PrimaryWeaponType != EWeaponType::HITSCAN || !pLocal || pLocal->m_MoveType() != MOVETYPE_WALK)
return;
switch (pWeapon ? pWeapon->GetWeaponID() : 0)
{
case TF_WEAPON_MEDIGUN:
case TF_WEAPON_LASER_POINTER:
return;
}
G::SilentAngles = true;
pCmd->viewangles.x += 360 * (vFakeAngles.x < 0 ? -1 : 1);
@@ -75,7 +82,7 @@ float CAntiAim::EdgeDistance(CTFPlayer* pEntity, float flEdgeRayYaw, float flOff
int CAntiAim::GetEdge(CTFPlayer* pEntity, const float flEdgeOrigYaw)
{
float flSize = pEntity->m_vecMaxs().y - pEntity->m_vecMins().y;
float flSize = pEntity->GetSize().y;
float flEdgeLeftDist = EdgeDistance(pEntity, flEdgeOrigYaw, -flSize);
float flEdgeRightDist = EdgeDistance(pEntity, flEdgeOrigYaw, flSize);
@@ -217,7 +224,7 @@ void CAntiAim::Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bo
int iAntiBackstab = F::Misc.AntiBackstab(pLocal, pCmd, bSendPacket);
if (!iAntiBackstab)
FakeShotAngles(pLocal, pCmd);
FakeShotAngles(pLocal, pWeapon, pCmd);
if (!G::AntiAim)
{
@@ -4,7 +4,7 @@
class CAntiAim
{
private:
void FakeShotAngles(CTFPlayer* pLocal, CUserCmd* pCmd);
void FakeShotAngles(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd);
float EdgeDistance(CTFPlayer* pEntity, float flEdgeRayYaw, float flOffset);
void RunOverlapping(CTFPlayer* pEntity, CUserCmd* pCmd, float& flRealYaw, bool bFake, float flEpsilon = 45.f);
@@ -30,4 +30,4 @@ public:
std::vector<std::pair<Vec3, Vec3>> vEdgeTrace = {};
};
ADD_FEATURE(CAntiAim, AntiAim)
ADD_FEATURE(CAntiAim, AntiAim);
@@ -18,4 +18,4 @@ public:
int m_iGoal = 0;
};
ADD_FEATURE(CFakeLag, FakeLag)
ADD_FEATURE(CFakeLag, FakeLag);
@@ -9,4 +9,4 @@ public:
void Run(CTFPlayer* pLocal, CTFWeaponBase* pWeapon, CUserCmd* pCmd, bool* pSendPacket);
};
ADD_FEATURE(CPacketManip, PacketManip)
ADD_FEATURE(CPacketManip, PacketManip);
+1 -1
View File
@@ -10,4 +10,4 @@ public:
void Run();
};
ADD_FEATURE(CPlayerlistCore, PlayerCore)
ADD_FEATURE(CPlayerlistCore, PlayerCore);
+1 -1
View File
@@ -111,4 +111,4 @@ public:
bool m_bSave = false;
};
ADD_FEATURE(CPlayerlistUtils, PlayerUtils)
ADD_FEATURE(CPlayerlistUtils, PlayerUtils);
+2 -2
View File
@@ -87,7 +87,7 @@ void CResolver::CreateMove(CTFPlayer* pLocal)
if (!pLocal)
return;
if (m_iWaitingForTarget != -1 && TICKS_TO_TIME(pLocal->m_nTickBase()) > m_flWaitingForDamage)
if (m_iWaitingForTarget != -1 && m_flWaitingForDamage < TICKS_TO_TIME(pLocal->m_nTickBase()))
{
if (auto pTarget = I::ClientEntityList->GetClientEntity(I::EngineClient->GetPlayerForUserID(m_iWaitingForTarget))->As<CTFPlayer>())
{
@@ -289,7 +289,7 @@ void CResolver::HitscanRan(CTFPlayer* pLocal, CTFPlayer* pTarget, CTFWeaponBase*
}
}
void CResolver::OnPlayerHurt(IGameEvent* pEvent)
void CResolver::PlayerHurt(IGameEvent* pEvent)
{
if (m_iWaitingForTarget == -1
|| I::EngineClient->GetPlayerForUserID(pEvent->GetInt("attacker")) != I::EngineClient->GetLocalPlayer()
+2 -2
View File
@@ -38,7 +38,7 @@ public:
void FrameStageNotify();
void CreateMove(CTFPlayer* pLocal);
void HitscanRan(CTFPlayer* pLocal, CTFPlayer* pTarget, CTFWeaponBase* pWeapon, int iHitbox = HITBOX_MAX);
void OnPlayerHurt(IGameEvent* pEvent);
void PlayerHurt(IGameEvent* pEvent);
void SetYaw(int iUserID, float flValue, bool bAuto = false);
void SetPitch(int iUserID, float flValue, bool bInverse = false, bool bAuto = false);
void SetMinwalk(int iUserID, bool bValue);
@@ -47,4 +47,4 @@ public:
void Reset();
};
ADD_FEATURE(CResolver, Resolver)
ADD_FEATURE(CResolver, Resolver);
@@ -216,7 +216,7 @@ bool CMovementSimulation::Initialize(CBaseEntity* pEntity, PlayerStorage& tStora
tStorage.m_pPlayer = pPlayer;
I::MoveHelper->SetHost(pPlayer);
pPlayer->SetCurrentCmd(&DummyCmd);
pPlayer->m_pCurrentCommand() = &DummyCmd;
// store player restore data
Store(tStorage);
@@ -710,7 +710,7 @@ void CMovementSimulation::Restore(PlayerStorage& tStorage)
return;
I::MoveHelper->SetHost(nullptr);
tStorage.m_pPlayer->SetCurrentCmd(nullptr);
tStorage.m_pPlayer->m_pCurrentCommand() = nullptr;
Reset(tStorage);
@@ -117,4 +117,4 @@ public:
float GetPredictedDelta(CBaseEntity* pEntity);
};
ADD_FEATURE(CMovementSimulation, MoveSim)
ADD_FEATURE(CMovementSimulation, MoveSim);
@@ -10,6 +10,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
bool bTrace = iFlags & ProjSimEnum::Trace;
bool bQuick = iFlags & ProjSimEnum::Quick;
bool bMaxSpeed = iFlags & ProjSimEnum::MaxSpeed;
static auto sv_gravity = U::ConVars.FindVar("sv_gravity");
@@ -72,7 +73,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
if (Vars::Visuals::Trajectory::Override.Value)
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { Vars::Visuals::Trajectory::OffsetX.Value, Vars::Visuals::Trajectory::OffsetY.Value, Vars::Visuals::Trajectory::OffsetZ.Value }, vPos, vAngle, !bTrace ? true : Vars::Visuals::Trajectory::Pipes.Value, bQuick);
tProjInfo = { FNV1A::Hash32Const("custom"), vPos, vAngle, { Vars::Visuals::Trajectory::Hull.Value, Vars::Visuals::Trajectory::Hull.Value, Vars::Visuals::Trajectory::Hull.Value }, Vars::Visuals::Trajectory::Speed.Value, Vars::Visuals::Trajectory::Gravity.Value, Vars::Visuals::Trajectory::NoSpin.Value, Vars::Visuals::Trajectory::LifeTime.Value };
tProjInfo = { pWeapon, FNV1A::Hash32Const("custom"), vPos, vAngle, { Vars::Visuals::Trajectory::Hull.Value, Vars::Visuals::Trajectory::Hull.Value, Vars::Visuals::Trajectory::Hull.Value }, Vars::Visuals::Trajectory::Speed.Value, Vars::Visuals::Trajectory::Gravity.Value, Vars::Visuals::Trajectory::LifeTime.Value };
return true;
}
@@ -83,7 +84,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, int(SDK::AttribHookValue(0, "centerfire_projectile", pWeapon)) == 1 ? 0.f : 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
float flSpeed = pPlayer->InCond(TF_COND_RUNE_PRECISION) ? 3000.f : SDK::AttribHookValue(1100.f, "mult_projectile_speed", pWeapon);
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_rocket.mdl"), vPos, vAngle, { 0.f, 0.f, 0.f }, flSpeed, 0.f, true };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_rocket.mdl"), vPos, vAngle, { 0.f, 0.f, 0.f }, flSpeed, 0.f };
return true;
}
case TF_WEAPON_PARTICLE_CANNON:
@@ -96,7 +97,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
if (pWeapon->GetWeaponID() == TF_WEAPON_DRG_POMSON)
vPos.z -= 13.f;
float flSpeed = bCowMangler ? 1100.f : 1200.f;
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_drg_ball.mdl"), vPos, vAngle, bCowMangler ? Vec3() : Vec3(1.f, 1.f, 1.f), flSpeed, 0.f, true };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_drg_ball.mdl"), vPos, vAngle, bCowMangler ? Vec3() : Vec3(1.f, 1.f, 1.f), flSpeed, 0.f };
return true;
}
case TF_WEAPON_GRENADELAUNCHER: // vphysics projectiles affected by server start gravity
@@ -111,7 +112,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
? pWeapon->As<CTFGrenadeLauncher>()->m_flDetonateTime() > 0.f ? pWeapon->As<CTFGrenadeLauncher>()->m_flDetonateTime() - I::GlobalVars->curtime : flMortar
: SDK::AttribHookValue(2.2f, "fuse_mult", pWeapon);
auto uType = bCannon ? FNV1A::Hash32Const("models/weapons/w_models/w_cannonball.mdl") : FNV1A::Hash32Const("models/weapons/w_models/w_grenade_grenadelauncher.mdl");
tProjInfo = { uType, vPos, vAngle, { 6.f, 6.f, 6.f }, flSpeed, 1.f, SDK::AttribHookValue(0, "grenade_no_spin", pWeapon) != 0, flLifetime };
tProjInfo = { pWeapon, uType, vPos, vAngle, { 6.f, 6.f, 6.f }, flSpeed, 1.f, flLifetime };
return true;
}
case TF_WEAPON_PIPEBOMBLAUNCHER:
@@ -120,29 +121,29 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
float flCharge = flAutoCharge > 0.f && SDK::AttribHookValue(1, "mult_dmg", pWeapon)
? SDK::AttribHookValue(4.f, "stickybomb_charge_rate", pWeapon) * flAutoCharge
: (pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() > 0.f ? I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() : 0.f);
float flSpeed = Math::RemapVal(flCharge, 0.f, SDK::AttribHookValue(4.f, "stickybomb_charge_rate", pWeapon), 900.f, 2400.f);
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_stickybomb.mdl"), vPos, vAngle, { 6.f, 6.f, 6.f }, flSpeed, 1.f, false };
float flSpeed = bMaxSpeed ? 2400.f : Math::RemapVal(flCharge, 0.f, SDK::AttribHookValue(4.f, "stickybomb_charge_rate", pWeapon), 900.f, 2400.f);
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_stickybomb.mdl"), vPos, vAngle, { 6.f, 6.f, 6.f }, flSpeed, 1.f };
return true;
}
case TF_WEAPON_FLAREGUN:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_flaregun_shell.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, SDK::AttribHookValue(2000.f, "mult_projectile_speed", pWeapon), 0.3f * flGravity, true};
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_flaregun_shell.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, SDK::AttribHookValue(2000.f, "mult_projectile_speed", pWeapon), 0.3f * flGravity };
return true;
}
case TF_WEAPON_FLAREGUN_REVENGE:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 12.f, bDucking ? 8.f : -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_flaregun_shell.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, 3000.f, 0.45f * flGravity, true };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_flaregun_shell.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, 3000.f, 0.45f * flGravity };
return true;
}
case TF_WEAPON_COMPOUND_BOW:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
float flCharge = pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() > 0.f ? I::GlobalVars->curtime - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime() : 0.f;
float flSpeed = Math::RemapVal(flCharge, 0.f, 1.f, 1800.f, 2600.f);
float flSpeed = bMaxSpeed ? 2600.f : Math::RemapVal(flCharge, 0.f, 1.f, 1800.f, 2600.f);
flGravity = Math::RemapVal(flCharge, 0.f, 1.f, 0.5f, 0.1f) * flGravity;
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_arrow.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, flSpeed, flGravity, true, 10.f /*arrows have some lifetime check for whatever reason*/ };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_arrow.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, flSpeed, flGravity, 10.f /*arrows have some lifetime check for whatever reason*/ };
return true;
}
case TF_WEAPON_CROSSBOW:
@@ -152,13 +153,13 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 23.5f, 8.f, -3.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
auto uType = bCrossbow ? FNV1A::Hash32Const("models/weapons/w_models/w_syringe_proj.mdl") : FNV1A::Hash32Const("models/weapons/w_models/w_repair_claw.mdl");
tProjInfo = { uType, vPos, vAngle, pWeapon->GetWeaponID() == TF_WEAPON_CROSSBOW ? Vec3(3.f, 3.f, 3.f) : Vec3(1.f, 1.f, 1.f), 2400.f, 0.2f * flGravity, true, 10.f /*arrows have some lifetime check for whatever reason*/ };
tProjInfo = { pWeapon, uType, vPos, vAngle, pWeapon->GetWeaponID() == TF_WEAPON_CROSSBOW ? Vec3(3.f, 3.f, 3.f) : Vec3(1.f, 1.f, 1.f), 2400.f, 0.2f * flGravity, 10.f /*arrows have some lifetime check for whatever reason*/ };
return true;
}
case TF_WEAPON_SYRINGEGUN_MEDIC:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 6.f, -8.f }, vPos, vAngle, !bTrace ? true : false, bQuick);
tProjInfo = { FNV1A::Hash32Const("models/weapons/w_models/w_syringe_proj.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, 1000.f, 0.3f * flGravity, true };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/w_models/w_syringe_proj.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f }, 1000.f, 0.3f * flGravity };
return true;
}
case TF_WEAPON_FLAMETHROWER:
@@ -167,19 +168,19 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
const float flHull = tf_flamethrower_boxsize->GetFloat();
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 40.f, 5.f, 0.f }, vPos, vAngle, true, bQuick, false);
tProjInfo = { FNV1A::Hash32Const("particles/flamethrower.pcf"), vPos, vAngle, { flHull, flHull, flHull }, 1000.f, 0.f, true, 0.285f };
tProjInfo = { pWeapon, FNV1A::Hash32Const("particles/flamethrower.pcf"), vPos, vAngle, { flHull, flHull, flHull }, 1000.f, 0.f, 0.285f };
return true;
}
case TF_WEAPON_FLAME_BALL:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 3.f, 7.f, -9.f }, vPos, vAngle, true, bQuick, false);
tProjInfo = { FNV1A::Hash32Const("models/weapons/c_models/c_flameball/c_flameball.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f /*damaging hull much bigger, shouldn't matter here*/ }, 3000.f, 0.f, true, 0.18f };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_flameball/c_flameball.mdl"), vPos, vAngle, { 1.f, 1.f, 1.f /*damaging hull much bigger, shouldn't matter here*/ }, 3000.f, 0.f, 0.18f };
return true;
}
case TF_WEAPON_CLEAVER:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
tProjInfo = { FNV1A::Hash32Const("models/workshop_partner/weapons/c_models/c_sd_cleaver/c_sd_cleaver.mdl"), vPos, vAngle, { 1.f, 1.f, 10.f /*weird, probably still inaccurate*/ }, 3000.f, 1.f, !bTrace ? true : false, 2.2f };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/workshop_partner/weapons/c_models/c_sd_cleaver/c_sd_cleaver.mdl"), vPos, vAngle, { 1.f, 1.f, 10.f /*weird, probably still inaccurate*/ }, 3000.f, 1.f, 2.2f };
return true;
}
case TF_WEAPON_BAT_WOOD:
@@ -192,7 +193,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
Vec3 vForward; Math::AngleVectors(vAngle, &vForward);
vPos = (bQuick ? pPlayer->GetAbsOrigin() : pPlayer->m_vecOrigin()) + (Vec3(0, 0, 50) + vForward * 32.f) * pPlayer->m_flModelScale(); // why?
auto uHash = bWrapAssassin ? FNV1A::Hash32Const("models/weapons/c_models/c_xms_festive_ornament.mdl") : FNV1A::Hash32Const("models/weapons/w_models/w_baseball.mdl");
tProjInfo = { uHash, vPos, vAngle, { 3.f, 3.f, 3.f }, tf_scout_stunball_base_speed->GetFloat(), 1.f, false, bWrapAssassin ? 2.3f : 100.f };
tProjInfo = { pWeapon, uHash, vPos, vAngle, { 3.f, 3.f, 3.f }, tf_scout_stunball_base_speed->GetFloat(), 1.f, bWrapAssassin ? 2.3f : 100.f };
return true;
}
case TF_WEAPON_JAR:
@@ -206,13 +207,13 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
case Sniper_s_TheSelfAwareBeautyMark: uType = FNV1A::Hash32Const("models/weapons/c_models/c_breadmonster/c_breadmonster.mdl"); break;
case Scout_s_MutatedMilk: uType = FNV1A::Hash32Const("models/weapons/c_models/c_breadmonster/c_breadmonster_milk.mdl"); break;
}
tProjInfo = { uType, vPos, vAngle, { 3.f, 3.f, 3.f }, 1000.f, 1.f, false, 2.2f };
tProjInfo = { pWeapon, uType, vPos, vAngle, { 3.f, 3.f, 3.f }, 1000.f, 1.f, 2.2f };
return true;
}
case TF_WEAPON_JAR_GAS:
{
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 16.f, 8.f, -6.f }, vPos, vAngle, true, bQuick);
tProjInfo = { FNV1A::Hash32Const("models/weapons/c_models/c_gascan/c_gascan.mdl"), vPos, vAngle, { 3.f, 3.f, 3.f }, 2000.f, 1.f, false, 2.2f };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_gascan/c_gascan.mdl"), vPos, vAngle, { 3.f, 3.f, 3.f }, 2000.f, 1.f, 2.2f };
return true;
}
case TF_WEAPON_GRAPPLINGHOOK:
@@ -232,7 +233,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
}
}
float flLifetime = tf_grapplinghook_max_distance->GetFloat() / flSpeed;
tProjInfo = { FNV1A::Hash32Const("models/weapons/c_models/c_grapple_proj/c_grapple_proj.mdl"), vPos, vAngle, { 1.2f, 1.2f, 1.2f }, flSpeed, 0.f, false, flLifetime };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_grapple_proj/c_grapple_proj.mdl"), vPos, vAngle, { 1.2f, 1.2f, 1.2f }, flSpeed, 0.f, flLifetime };
return true;
}
}
@@ -246,7 +247,7 @@ bool CProjectileSimulation::GetInfoMain(CTFPlayer* pPlayer, CTFWeaponBase* pWeap
case Heavy_s_TheDalokohsBar:
case Heavy_s_SecondBanana:
SDK::GetProjectileFireSetup(pPlayer, vAngles, { 0.f, 0.f, -8.f }, vPos, vAngle, true, bQuick);
tProjInfo = { FNV1A::Hash32Const("models/weapons/c_models/c_sandwich/c_sandwich.mdl"), vPos, vAngle, { 17.f, 17.f, 7.f }, 500.f, 1.f * flGravity, false };
tProjInfo = { pWeapon, FNV1A::Hash32Const("models/weapons/c_models/c_sandwich/c_sandwich.mdl"), vPos, vAngle, { 17.f, 17.f, 7.f }, 500.f, 1.f * flGravity };
return true;
}
@@ -457,7 +458,8 @@ bool CProjectileSimulation::Initialize(ProjectileInfo& tProjInfo, bool bSimulate
if (!tProjInfo.m_bQuick && G::CurrentUserCmd)
{
vVelocity += vUp * 200.f + vUp * SDK::RandomFloat(-10.f, 10.f) + vRight * SDK::RandomFloat(-10.f, 10.f);
vAngularVelocity = { 600.f, float(SDK::RandomInt(-1200, 1200)), 0.f };
if (!tProjInfo.m_pWeapon || !SDK::AttribHookValue(0, "grenade_no_spin", tProjInfo.m_pWeapon))
vAngularVelocity = { 600.f, float(SDK::RandomInt(-1200, 1200)), 0.f };
break;
}
vVelocity += vUp * 200.f;
@@ -528,9 +530,6 @@ bool CProjectileSimulation::Initialize(ProjectileInfo& tProjInfo, bool bSimulate
}
}
if (tProjInfo.m_bNoSpin)
vAngularVelocity.Zero();
if (bSimulate && !F::ProjSim.obj->IsDragEnabled() && obj->m_dragBasis.IsZero()) // don't include vphysics projectiles
vVelocity.z += 400.f * tProjInfo.m_flGravity * TICK_INTERVAL; // i don't know why this makes it more accurate but it does
@@ -7,11 +7,13 @@ Enum(ProjSim,
InitCheck = 1 << 1,
Quick = 1 << 2,
NoRandomAngles = 1 << 3,
PredictCmdNum = 1 << 4
PredictCmdNum = 1 << 4,
MaxSpeed = 1 << 5
)
struct ProjectileInfo
{
CTFWeaponBase* m_pWeapon = nullptr;
uint32_t m_uType = 0;
Vec3 m_vPos = {};
@@ -20,7 +22,6 @@ struct ProjectileInfo
float m_flVelocity = 0.f;
float m_flGravity = 0.f;
bool m_bNoSpin = false;
float m_flLifetime = 60.f;
CTFPlayer* m_pOwner = nullptr;
@@ -60,4 +61,4 @@ public:
IPhysicsObject* obj = nullptr;
};
ADD_FEATURE(CProjectileSimulation, ProjSim)
ADD_FEATURE(CProjectileSimulation, ProjSim);
+1 -1
View File
@@ -19,4 +19,4 @@ public:
int m_iTargetMode = OBS_MODE_NONE;
};
ADD_FEATURE(CSpectate, Spectate)
ADD_FEATURE(CSpectate, Spectate);
+1 -1
View File
@@ -59,4 +59,4 @@ public:
int m_iDeficit = 0;
};
ADD_FEATURE(CTickshiftHandler, Ticks)
ADD_FEATURE(CTickshiftHandler, Ticks);
@@ -19,4 +19,4 @@ public:
bool m_bDrawing = false;
};
ADD_FEATURE(CCameraWindow, CameraWindow)
ADD_FEATURE(CCameraWindow, CameraWindow);
+1 -1
View File
@@ -38,4 +38,4 @@ public:
std::unordered_map<int, bool> m_mEntities = {};
};
ADD_FEATURE(CChams, Chams)
ADD_FEATURE(CChams, Chams);
+76 -27
View File
@@ -164,7 +164,7 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
tCache.m_flUber = std::clamp(pMediGun->As<CWeaponMedigun>()->m_flChargeLevel(), 0.f, 1.f);
tCache.m_bUberBar = Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::UberBar;
if (Vars::ESP::Player.Value & Vars::ESP::PlayerEnum::UberText)
tCache.m_vText.emplace_back(ESPTextEnum::Uber, std::format("{:.0f}%%", tCache.m_flUber * 100.f), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
tCache.m_vText.emplace_back(ESPTextEnum::Uber, std::format("{:.0f}%", tCache.m_flUber * 100.f), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
}
}
@@ -315,6 +315,65 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
if (pPlayer->InCond(TF_COND_POWERUPMODE_DOMINANT))
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Dominant", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
for (int i = 0; i < MAX_WEAPONS; i++)
{
auto pWeapon = pPlayer->GetWeaponFromSlot(i)->As<CTFSpellBook>();
if (!pWeapon || pWeapon->GetWeaponID() != TF_WEAPON_SPELLBOOK || !pWeapon->m_iSpellCharges())
continue;
switch (pWeapon->m_iSelectedSpellIndex())
{
case 0:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Fireball", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 1:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Bats", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 2:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Heal", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 3:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Pumpkins", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 4:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Jump", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 5:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Stealth", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 6:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Teleport", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 7:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Lightning", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 8:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Minify", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 9:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Meteors", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 10:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Monoculus", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 11:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Skeletons", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 12:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Glove", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 13:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Parachute", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 14:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Heal", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
case 15:
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Bomb", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
}
}
if (pPlayer->InCond(TF_COND_RADIUSHEAL) ||
pPlayer->InCond(TF_COND_HEALTH_BUFF) ||
pPlayer->InCond(TF_COND_RADIUSHEAL_ON_DAMAGE) ||
@@ -358,9 +417,9 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
tCache.m_vText.emplace_back(ESPTextEnum::Right, "DR", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
else if (pPlayer->InCond(TF_COND_FEIGN_DEATH))
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Feign", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
if (pPlayer->InCond(TF_COND_STEALTHED) || pPlayer->InCond(TF_COND_STEALTHED_BLINK) || pPlayer->InCond(TF_COND_STEALTHED_USER_BUFF) || pPlayer->InCond(TF_COND_STEALTHED_USER_BUFF_FADING))
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Invis {:.0f}%%", pPlayer->GetInvisPercentage()), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
if (pPlayer->m_flInvisibility())
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Invis {:.0f}%", pPlayer->m_flInvisibility() * 100), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
if (pPlayer->InCond(TF_COND_DISGUISING) || pPlayer->InCond(TF_COND_DISGUISED))
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Disguise", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
@@ -378,24 +437,24 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
{
if (bLocal)
{
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Charging {:.0f}%%", Math::RemapVal(pWeapon->As<CTFSniperRifle>()->m_flChargedDamage(), 0.f, 150.f, 0.f, 100.f)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Charging {:.0f}%", Math::RemapVal(pWeapon->As<CTFSniperRifle>()->m_flChargedDamage(), 0.f, 150.f, 0.f, 100.f)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
}
else
{
CSniperDot* pPlayerDot = nullptr;
for (auto pDot : H::Entities.GetGroup(EGroupType::MISC_DOTS))
{
if (pDot->m_hOwnerEntity().Get() == pEntity)
auto GetSniperDot = [](CBaseEntity* pEntity) -> CSniperDot*
{
pPlayerDot = pDot->As<CSniperDot>();
break;
}
}
if (pPlayerDot)
for (auto pDot : H::Entities.GetGroup(EGroupType::MISC_DOTS))
{
if (pDot->m_hOwnerEntity().Get() == pEntity)
return pDot->As<CSniperDot>();
}
return nullptr;
};
if (CSniperDot* pPlayerDot = GetSniperDot(pEntity))
{
float flChargeTime = std::max(SDK::AttribHookValue(3.f, "mult_sniper_charge_per_sec", pWeapon), 1.5f);
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Charging {:.0f}%%", Math::RemapVal(TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick) - pPlayerDot->m_flChargeStartTime() - 0.3f, 0.f, flChargeTime, 0.f, 100.f)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Charging {:.0f}%", Math::RemapVal(TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick) - pPlayerDot->m_flChargeStartTime() - 0.3f, 0.f, flChargeTime, 0.f, 100.f)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
}
}
@@ -405,7 +464,7 @@ void CESP::StorePlayers(CTFPlayer* pLocal)
case TF_WEAPON_COMPOUND_BOW:
if (bLocal)
{
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Charging {:.0f}%%", Math::RemapVal(TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick) - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime(), 0.f, 1.f, 0.f, 100.f)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("Charging {:.0f}%", Math::RemapVal(TICKS_TO_TIME(I::ClientState->m_ClockDriftMgr.m_nServerTick) - pWeapon->As<CTFPipebombLauncher>()->m_flChargeBeginTime(), 0.f, 1.f, 0.f, 100.f)), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
break;
}
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Charging", Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
@@ -500,7 +559,7 @@ void CESP::StoreBuildings(CTFPlayer* pLocal)
{
float flConstructed = pBuilding->m_flPercentageConstructed();
if (flConstructed < 1.f)
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("{:.0f}%%", flConstructed * 100.f), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
tCache.m_vText.emplace_back(ESPTextEnum::Right, std::format("{:.0f}%", flConstructed * 100.f), Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
if (pBuilding->IsSentrygun() && pBuilding->As<CObjectSentrygun>()->m_bPlayerControlled())
tCache.m_vText.emplace_back(ESPTextEnum::Right, "Wrangled", Vars::Colors::IndicatorTextBad.Value, Vars::Menu::Theme::Background.Value);
@@ -625,9 +684,6 @@ void CESP::StoreProjectiles(CTFPlayer* pLocal)
const char* szName = "Projectile";
switch (pEntity->GetClassID())
{
//case ETFClassID::CBaseProjectile:
//case ETFClassID::CBaseGrenade:
//case ETFClassID::CTFWeaponBaseGrenadeProj:
case ETFClassID::CTFWeaponBaseMerasmusGrenade: szName = "Bomb"; break;
case ETFClassID::CTFGrenadePipebombProjectile: szName = pEntity->As<CTFGrenadePipebombProjectile>()->HasStickyEffects() ? "Sticky" : "Pipe"; break;
case ETFClassID::CTFStunBall: szName = "Baseball"; break;
@@ -646,14 +702,9 @@ void CESP::StoreProjectiles(CTFPlayer* pLocal)
case ETFClassID::CTFProjectile_SpellSpawnHorde:
case ETFClassID::CTFProjectile_SpellSpawnZombie: szName = "Skeleton"; break;
case ETFClassID::CTFProjectile_SpellTransposeTeleport: szName = "Teleport"; break;
//case ETFClassID::CTFProjectile_Throwable:
//case ETFClassID::CTFProjectile_ThrowableBrick:
//case ETFClassID::CTFProjectile_ThrowableRepel: szName = "Throwable"; break;
case ETFClassID::CTFProjectile_Arrow: szName = pEntity->As<CTFProjectile_Arrow>()->m_iProjectileType() == TF_PROJECTILE_BUILDING_REPAIR_BOLT ? "Repair" : "Arrow"; break;
case ETFClassID::CTFProjectile_GrapplingHook: szName = "Grapple"; break;
case ETFClassID::CTFProjectile_HealingBolt: szName = "Heal"; break;
//case ETFClassID::CTFBaseRocket:
//case ETFClassID::CTFFlameRocket:
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_EnergyBall:
case ETFClassID::CTFProjectile_SentryRocket: szName = "Rocket"; break;
@@ -663,9 +714,7 @@ void CESP::StoreProjectiles(CTFPlayer* pLocal)
case ETFClassID::CTFProjectile_SpellLightningOrb: szName = "Lightning"; break;
case ETFClassID::CTFProjectile_SpellKartOrb: szName = "Fist"; break;
case ETFClassID::CTFProjectile_Flare: szName = "Flare"; break;
//case ETFClassID::CTFBaseProjectile:
case ETFClassID::CTFProjectile_EnergyRing: szName = "Energy"; break;
//case ETFClassID::CTFProjectile_Syringe: szName = "Syringe";
}
tCache.m_vText.emplace_back(ESPTextEnum::Top, szName, Vars::Menu::Theme::Active.Value, Vars::Menu::Theme::Background.Value);
}
+1 -1
View File
@@ -65,4 +65,4 @@ public:
void Draw();
};
ADD_FEATURE(CESP, ESP)
ADD_FEATURE(CESP, ESP);
@@ -12,4 +12,4 @@ public:
bool bDrawChams = false;
};
ADD_FEATURE(CFakeAngle, FakeAngle)
ADD_FEATURE(CFakeAngle, FakeAngle);
+1 -1
View File
@@ -135,7 +135,7 @@ bool CGlow::GetGlow(CTFPlayer* pLocal, CBaseEntity* pEntity, Glow_t* pGlow, Colo
case ETFClassID::CTFBaseBoss:
case ETFClassID::CTFTankBoss:
case ETFClassID::CZombie:
if (pEntity->m_iTeamNum() == TF_TEAM_BLUE || pEntity->m_iTeamNum() == TF_TEAM_RED)
if (pEntity->IsInValidTeam())
{
if (auto pOwner = pEntity->m_hOwnerEntity().Get())
return GetPlayerGlow(pOwner, pEntity, pLocal, pGlow, pColor, Vars::Glow::World::NPCs.Value, Vars::Glow::World::NPCs.Value);
+1 -1
View File
@@ -67,4 +67,4 @@ public:
bool m_bRendering = false;
};
ADD_FEATURE(CGlow, Glow)
ADD_FEATURE(CGlow, Glow);
@@ -150,7 +150,7 @@ bool CGroups::ShouldTarget(Group_t& tGroup, CBaseEntity* pEntity, CTFPlayer* pLo
case ETFClassID::CTFBaseBoss:
case ETFClassID::CTFTankBoss:
case ETFClassID::CZombie:
if (pEntity->m_iTeamNum() == TF_TEAM_BLUE || pEntity->m_iTeamNum() == TF_TEAM_RED)
if (pEntity->IsInValidTeam())
{
if (auto pOwner = pEntity->m_hOwnerEntity().Get())
return ShouldTargetOwner(tGroup.m_iTargets & TargetsEnum::NPCs, tGroup, pOwner, pEntity, pLocal);
+1 -1
View File
@@ -53,4 +53,4 @@ public:
std::vector<Group_t> m_vGroups = {}; // loop through this in reverse so back groups have higher priority
};
ADD_FEATURE(CGroups, Groups)
ADD_FEATURE(CGroups, Groups);
@@ -40,4 +40,4 @@ public:
bool m_bLoaded = false;
};
ADD_FEATURE(CMaterials, Materials)
ADD_FEATURE(CMaterials, Materials);
@@ -23,4 +23,4 @@ public:
void Draw();
};
ADD_FEATURE(CNotifications, Notifications)
ADD_FEATURE(CNotifications, Notifications);
@@ -10,4 +10,4 @@ public:
void Run(CTFPlayer* pLocal);
};
ADD_FEATURE(CPlayerArrows, PlayerArrows)
ADD_FEATURE(CPlayerArrows, PlayerArrows);
@@ -69,18 +69,21 @@ std::vector<std::string> CPlayerConditions::Get(CTFPlayer* pEntity)
if (pEntity->InCond(TF_COND_MEDIGUN_UBER_BULLET_RESIST) ||
pEntity->InCond(TF_COND_MEDIGUN_SMALL_BULLET_RESIST) ||
pEntity->InCond(TF_COND_BULLET_IMMUNE))
vConditions.emplace_back("Bullet+");
else if (pEntity->InCond(TF_COND_MEDIGUN_SMALL_BULLET_RESIST))
vConditions.emplace_back("Bullet");
if (pEntity->InCond(TF_COND_MEDIGUN_UBER_BLAST_RESIST) ||
pEntity->InCond(TF_COND_MEDIGUN_SMALL_BLAST_RESIST) ||
pEntity->InCond(TF_COND_BLAST_IMMUNE))
vConditions.emplace_back("Blast+");
else if (pEntity->InCond(TF_COND_MEDIGUN_SMALL_BLAST_RESIST))
vConditions.emplace_back("Blast");
if (pEntity->InCond(TF_COND_MEDIGUN_UBER_FIRE_RESIST) ||
pEntity->InCond(TF_COND_MEDIGUN_SMALL_FIRE_RESIST) ||
pEntity->InCond(TF_COND_FIRE_IMMUNE))
vConditions.emplace_back("Fire+");
else if (pEntity->InCond(TF_COND_MEDIGUN_SMALL_FIRE_RESIST))
vConditions.emplace_back("Fire");
@@ -8,4 +8,4 @@ public:
void Draw(CTFPlayer* pLocal);
};
ADD_FEATURE(CPlayerConditions, PlayerConditions)
ADD_FEATURE(CPlayerConditions, PlayerConditions);
+2 -2
View File
@@ -334,9 +334,9 @@ void CRadar::DrawPoints(CTFPlayer* pLocal)
[[fallthrough]];
}
case Vars::Radar::Player::IconEnum::Portraits:
if (pPlayer->IsInValidTeam())
if (int iTeam = pPlayer->IsInValidTeam())
{
H::Draw.Texture(x, y, iSize, iSize, pPlayer->m_iClass() + (pPlayer->m_iTeamNum() == TF_TEAM_RED ? 9 : 18) - 1);
H::Draw.Texture(x, y, iSize, iSize, pPlayer->m_iClass() + (iTeam == TF_TEAM_RED ? 9 : 18) - 1);
break;
}
[[fallthrough]];
+1 -1
View File
@@ -11,4 +11,4 @@ public:
void Run(CTFPlayer* pLocal);
};
ADD_FEATURE(CRadar, Radar)
ADD_FEATURE(CRadar, Radar);
@@ -21,4 +21,4 @@ public:
void Draw(CTFPlayer* pLocal);
};
ADD_FEATURE(CSpectatorList, SpectatorList)
ADD_FEATURE(CSpectatorList, SpectatorList);
+45 -27
View File
@@ -222,13 +222,11 @@ void CVisuals::SplashRadius(CTFPlayer* pLocal)
switch (pEntity->GetClassID())
{
case ETFClassID::CBaseGrenade:
case ETFClassID::CTFWeaponBaseGrenadeProj:
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
case ETFClassID::CTFGrenadePipebombProjectile:
bShouldDraw = Vars::Visuals::Simulation::SplashRadius.Value & (pEntity->As<CTFGrenadePipebombProjectile>()->HasStickyEffects() ? Vars::Visuals::Simulation::SplashRadiusEnum::Stickies : Vars::Visuals::Simulation::SplashRadiusEnum::Pipes);
break;
case ETFClassID::CTFBaseRocket:
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_SentryRocket:
case ETFClassID::CTFProjectile_EnergyBall:
@@ -246,13 +244,11 @@ void CVisuals::SplashRadius(CTFPlayer* pLocal)
switch (pEntity->GetClassID())
{
case ETFClassID::CBaseGrenade:
case ETFClassID::CTFWeaponBaseGrenadeProj:
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
case ETFClassID::CTFGrenadePipebombProjectile:
pOwner = pEntity->As<CTFGrenadePipebombProjectile>()->m_hThrower().Get()->As<CTFPlayer>();
break;
case ETFClassID::CTFBaseRocket:
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_SentryRocket:
case ETFClassID::CTFProjectile_EnergyBall:
@@ -275,13 +271,11 @@ void CVisuals::SplashRadius(CTFPlayer* pLocal)
float flRadius = 146.f;
switch (pEntity->GetClassID())
{
case ETFClassID::CBaseGrenade:
case ETFClassID::CTFWeaponBaseGrenadeProj:
case ETFClassID::CTFWeaponBaseMerasmusGrenade:
case ETFClassID::CTFGrenadePipebombProjectile:
pWeapon = pEntity->As<CTFGrenadePipebombProjectile>()->m_hOriginalLauncher().Get()->As<CTFWeaponBase>();
break;
case ETFClassID::CTFBaseRocket:
case ETFClassID::CTFProjectile_Rocket:
case ETFClassID::CTFProjectile_SentryRocket:
case ETFClassID::CTFProjectile_EnergyBall:
@@ -335,12 +329,6 @@ void CVisuals::DrawAntiAim(CTFPlayer* pLocal)
}
}
void CVisuals::DrawSightlines()
{
for (auto& tSightline : m_vSightLines)
H::Draw.RenderLine(tSightline.m_vStart, tSightline.m_vEnd, tSightline.m_Color, tSightline.m_bZBuffer);
}
void CVisuals::DrawPickupTimers()
{
if (!Vars::ESP::Other::PickupTimers.Value)
@@ -359,9 +347,8 @@ void CVisuals::DrawPickupTimers()
Vec3 vScreen; if (SDK::W2S(tPickup.Location, vScreen))
{
auto sText = std::format("{:.1f}s", 10.f - flTime);
auto tColor = tPickup.Type ? Vars::Colors::Health.Value : Vars::Colors::Ammo.Value;
H::Draw.StringOutlined(H::Fonts.GetFont(FONT_ESP), vScreen.x, vScreen.y, tColor, Vars::Menu::Theme::Background.Value, ALIGN_CENTER, sText.c_str());
H::Draw.StringOutlined(H::Fonts.GetFont(FONT_ESP), vScreen.x, vScreen.y, tColor, Vars::Menu::Theme::Background.Value, ALIGN_CENTER, std::format("{:.1f}s", 10.f - flTime).c_str());
}
it++;
@@ -531,19 +518,15 @@ std::vector<DrawBox_t> CVisuals::GetHitboxes(matrix3x4* aBones, CBaseAnimating*
return vBoxes;
}
void CVisuals::DrawLines()
void CVisuals::DrawEffects()
{
for (auto& tLine : G::LineStorage)
{
if (tLine.m_flTime < I::GlobalVars->curtime)
continue;
H::Draw.RenderLine(tLine.m_vPair.first, tLine.m_vPair.second, tLine.m_tColor, tLine.m_bZBuffer);
H::Draw.RenderLine(tLine.m_vOrigin.first, tLine.m_vOrigin.second, tLine.m_tColor, tLine.m_bZBuffer);
}
}
void CVisuals::DrawPaths()
{
for (auto& tPath : G::PathStorage)
{
if (tPath.m_flTime >= 0.f && tPath.m_flTime < I::GlobalVars->curtime)
@@ -551,18 +534,31 @@ void CVisuals::DrawPaths()
H::Draw.RenderPath(tPath.m_vPath, tPath.m_tColor, tPath.m_bZBuffer, tPath.m_iStyle, tPath.m_flTime);
}
}
void CVisuals::DrawBoxes()
{
for (auto& tBox : G::BoxStorage)
{
if (tBox.m_flTime < I::GlobalVars->curtime)
continue;
H::Draw.RenderBox(tBox.m_vPos, tBox.m_vMins, tBox.m_vMaxs, tBox.m_vRotation, tBox.m_tColorFace, tBox.m_bZBuffer);
H::Draw.RenderWireframeBox(tBox.m_vPos, tBox.m_vMins, tBox.m_vMaxs, tBox.m_vRotation, tBox.m_tColorEdge, tBox.m_bZBuffer);
H::Draw.RenderBox(tBox.m_vOrigin, tBox.m_vMins, tBox.m_vMaxs, tBox.m_vAngles, tBox.m_tColorFace, tBox.m_bZBuffer);
H::Draw.RenderWireframeBox(tBox.m_vOrigin, tBox.m_vMins, tBox.m_vMaxs, tBox.m_vAngles, tBox.m_tColorEdge, tBox.m_bZBuffer);
}
for (auto& tBox : G::SphereStorage)
{
if (tBox.m_flTime < I::GlobalVars->curtime)
continue;
H::Draw.RenderSphere(tBox.m_vOrigin, tBox.m_flRadius, tBox.m_nTheta, tBox.m_nPhi, tBox.m_tColorFace, tBox.m_bZBuffer);
H::Draw.RenderWireframeSphere(tBox.m_vOrigin, tBox.m_flRadius, tBox.m_nTheta, tBox.m_nPhi, tBox.m_tColorEdge, tBox.m_bZBuffer);
}
for (auto& tBox : G::SweptStorage)
{
if (tBox.m_flTime < I::GlobalVars->curtime)
continue;
H::Draw.RenderWireframeSweptBox(tBox.m_vOrigin.first, tBox.m_vOrigin.second, tBox.m_vMins, tBox.m_vMaxs, tBox.m_vAngles, tBox.m_tColor, tBox.m_bZBuffer);
}
for (auto& tSightline : m_vSightLines)
H::Draw.RenderLine(tSightline.m_vStart, tSightline.m_vEnd, tSightline.m_Color, tSightline.m_bZBuffer);
}
void CVisuals::DrawServerHitboxes(CTFPlayer* pLocal)
@@ -728,7 +724,18 @@ void CVisuals::Event(IGameEvent* pEvent, uint32_t uHash)
m_vPickups.emplace_back(1, I::EngineClient->Time(), pEntity->m_vecOrigin());
else if (std::strstr(sItemName, "ammopack"))
m_vPickups.emplace_back(0, I::EngineClient->Time(), pEntity->m_vecOrigin());
break;
}
case FNV1A::Hash32Const("client_disconnect"):
case FNV1A::Hash32Const("client_beginconnect"):
case FNV1A::Hash32Const("game_newmap"):
case FNV1A::Hash32Const("teamplay_round_start"):
G::LineStorage.clear();
G::BoxStorage.clear();
G::PathStorage.clear();
G::SphereStorage.clear();
G::SweptStorage.clear();
}
}
@@ -894,7 +901,18 @@ void CVisuals::RestoreWorldModulation()
void CVisuals::CreateMove(CTFPlayer* pLocal, CTFWeaponBase* pWeapon)
{
if (Vars::Visuals::Simulation::ShotPath.Value && G::Attacking == 1 && !F::Aimbot.m_bRan)
F::Visuals.ProjectileTrace(pLocal, pWeapon, false);
{
switch (pWeapon->GetWeaponID())
{
case TF_WEAPON_BAT_WOOD:
case TF_WEAPON_BAT_GIFTWRAP:
if (!G::Throwing)
break;
[[fallthrough]];
default:
F::Visuals.ProjectileTrace(pLocal, pWeapon, false);
}
}
if (pLocal && Vars::Visuals::Effects::SpellFootsteps.Value && (F::Ticks.m_bDoubletap || F::Ticks.m_bWarp))
S::CTFPlayer_FireEvent.Call<void>(pLocal, pLocal->GetAbsOrigin(), QAngle(), 7001, nullptr);
+2 -5
View File
@@ -32,14 +32,11 @@ public:
void ProjectileTrace(CTFPlayer* pPlayer, CTFWeaponBase* pWeapon, const bool bQuick = true);
void SplashRadius(CTFPlayer* pLocal);
void DrawAntiAim(CTFPlayer* pLocal);
void DrawSightlines();
void DrawPickupTimers();
void DrawDebugInfo(CTFPlayer* pLocal);
std::vector<DrawBox_t> GetHitboxes(matrix3x4* aBones, CBaseAnimating* pEntity, std::vector<int> vHitboxes = {}, int iTarget = -1);
void DrawLines();
void DrawPaths();
void DrawBoxes();
void DrawEffects();
void DrawServerHitboxes(CTFPlayer* pLocal);
void FOV(CTFPlayer* pLocal, CViewSetup* pView);
@@ -52,4 +49,4 @@ public:
void CreateMove(CTFPlayer* pLocal, CTFWeaponBase* pWeapon);
};
ADD_FEATURE(CVisuals, Visuals)
ADD_FEATURE(CVisuals, Visuals);
@@ -76,7 +76,7 @@ MAKE_HOOK(CBaseEntity_SetAbsVelocity, S::CBaseEntity_SetAbsVelocity(), void,
return CALL_ORIGINAL(rcx, vecAbsVelocity);
auto& tOldRecord = pRecords->front();
auto tNewRecord = VelFixRecord(pPlayer->m_vecOrigin() + Vec3(0, 0, pPlayer->m_vecMaxs().z - pPlayer->m_vecMins().z), pPlayer->m_flSimulationTime());
auto tNewRecord = VelFixRecord(pPlayer->m_vecOrigin() + Vec3(0, 0, pPlayer->GetSize().z), pPlayer->m_flSimulationTime());
int iDeltaTicks = TIME_TO_TICKS(tNewRecord.m_flSimulationTime - tOldRecord.m_flSimulationTime);
float flDeltaTime = TICKS_TO_TIME(iDeltaTicks);
@@ -56,7 +56,7 @@ MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), voi
CALL_ORIGINAL(rcx, pOwner, vNewEyePosition, vEyeAngles);
}
MAKE_HOOK(ClientModeTFNormal_GetViewModelFOV, U::Memory.GetVFunc(I::ClientModeShared, 32), float,
MAKE_HOOK(ClientModeTFNormal_GetViewModelFOV, U::Memory.GetVirtual(I::ClientModeShared, 32), float,
/*void* rcx*/)
{
#ifdef DEBUG_HOOKS
@@ -30,7 +30,7 @@ struct CmdHistory_t
MAKE_SIGNATURE(IHasGenericMeter_GetMeterMultiplier, "client.dll", "F3 0F 10 81 ? ? ? ? C3 CC CC CC CC CC CC CC 48 85 D2", 0x0);
MAKE_HOOK(CClientModeShared_CreateMove, U::Memory.GetVFunc(I::ClientModeShared, 21), bool,
MAKE_HOOK(CClientModeShared_CreateMove, U::Memory.GetVirtual(I::ClientModeShared, 21), bool,
CClientModeShared* rcx, float flInputSampleTime, CUserCmd* pCmd)
{
#ifdef DEBUG_HOOKS
@@ -66,34 +66,17 @@ MAKE_HOOK(CClientModeShared_CreateMove, U::Memory.GetVFunc(I::ClientModeShared,
auto pWeapon = H::Entities.GetWeapon();
if (pLocal && pWeapon)
{ // update weapon info
G::CanPrimaryAttack = G::CanSecondaryAttack = G::Reloading = false;
bool bCanAttack = pLocal->CanAttack();
{
static int iStaticItemDefinitionIndex = 0;
int iOldItemDefinitionIndex = iStaticItemDefinitionIndex;
int iNewItemDefinitionIndex = iStaticItemDefinitionIndex = pWeapon->m_iItemDefinitionIndex();
if (iNewItemDefinitionIndex != iOldItemDefinitionIndex || !pWeapon->m_iClip1() || !pLocal->IsAlive() || pLocal->IsAGhost() || pLocal->IsTaunting() || pLocal->InCond(TF_COND_PHASE) || pLocal->InCond(TF_COND_HALLOWEEN_KART))
if (iNewItemDefinitionIndex != iOldItemDefinitionIndex || !bCanAttack || !pWeapon->m_iClip1())
F::Ticks.m_iWait = 1;
}
G::CanPrimaryAttack = G::CanSecondaryAttack = G::Reloading = false;
bool bCanAttack = pLocal->CanAttack();
switch (SDK::GetRoundState())
{
case GR_STATE_TEAM_WIN:
if (pLocal->m_iTeamNum() != SDK::GetWinningTeam())
bCanAttack = false;
break;
case GR_STATE_BETWEEN_RNDS:
if (pLocal->m_fFlags() & FL_FROZEN)
bCanAttack = false;
break;
case GR_STATE_GAME_OVER:
if (pLocal->m_fFlags() & FL_FROZEN || pLocal->m_iTeamNum() != SDK::GetWinningTeam())
bCanAttack = false;
break;
}
if (pLocal->InCond(TF_COND_STUNNED) && pLocal->m_iStunFlags() & (TF_STUN_CONTROLS | TF_STUN_LOSER_STATE))
bCanAttack = false;
if (bCanAttack)
{
G::CanPrimaryAttack = pWeapon->CanPrimaryAttack();
@@ -6,7 +6,7 @@
#include "../Features/Visuals/Visuals.h"
#include "../Features/Visuals/Materials/Materials.h"
MAKE_HOOK(CClientModeShared_DoPostScreenSpaceEffects, U::Memory.GetVFunc(I::ClientModeShared, 39), bool,
MAKE_HOOK(CClientModeShared_DoPostScreenSpaceEffects, U::Memory.GetVirtual(I::ClientModeShared, 39), bool,
void* rcx, const CViewSetup* pSetup)
{
#ifdef DEBUG_HOOKS
@@ -29,11 +29,7 @@ MAKE_HOOK(CClientModeShared_DoPostScreenSpaceEffects, U::Memory.GetVFunc(I::Clie
if (F::CameraWindow.m_bDrawing)
return CALL_ORIGINAL(rcx, pSetup);
F::Visuals.DrawBoxes();
F::Visuals.DrawPaths();
F::Visuals.DrawLines();
F::Visuals.DrawSightlines();
F::Visuals.DrawEffects();
F::Chams.m_mEntities.clear();
if (!I::EngineVGui->IsGameUIVisible() && pLocal && F::Materials.m_bLoaded)
{
@@ -2,7 +2,7 @@
#include "../Features/Visuals/Visuals.h"
MAKE_HOOK(CClientModeShared_OverrideView, U::Memory.GetVFunc(I::ClientModeShared, 16), void,
MAKE_HOOK(CClientModeShared_OverrideView, U::Memory.GetVirtual(I::ClientModeShared, 16), void,
void* rcx, CViewSetup* pView)
{
#ifdef DEBUG_HOOKS
@@ -2,7 +2,7 @@
#include "../Features/Visuals/Visuals.h"
MAKE_HOOK(CClientModeShared_ShouldDrawViewModel, U::Memory.GetVFunc(I::ClientModeShared, 24), bool,
MAKE_HOOK(CClientModeShared_ShouldDrawViewModel, U::Memory.GetVirtual(I::ClientModeShared, 24), bool,
void* rcx)
{
#ifdef DEBUG_HOOKS
@@ -38,7 +38,7 @@ MAKE_HOOK(CHudCrosshair_GetDrawPosition, S::CHudCrosshair_GetDrawPosition(), voi
Vec3 vForward; Math::AngleVectors(vAngles, &vForward);
Vec3 vStartPos = pLocal->GetEyePosition();
Vec3 vEndPos = (vStartPos + vForward * 8192);
Vec3 vEndPos = vStartPos + vForward * 8192;
CGameTrace trace = {};
CTraceFilterHitscan filter = {}; filter.pSkip = pLocal;
@@ -1,6 +1,6 @@
#include "../SDK/SDK.h"
MAKE_HOOK(CStudioRender_DrawModelStaticProp, U::Memory.GetVFunc(I::StudioRender, 30), void,
MAKE_HOOK(CStudioRender_DrawModelStaticProp, U::Memory.GetVirtual(I::StudioRender, 30), void,
void* rcx, const DrawModelState_t& pState, const matrix3x4& modelToWorld, int flags)
{
#ifdef DEBUG_HOOKS
@@ -1,6 +1,6 @@
#include "../SDK/SDK.h"
MAKE_HOOK(CStudioRender_SetAlphaModulation, U::Memory.GetVFunc(I::StudioRender, 28), void,
MAKE_HOOK(CStudioRender_SetAlphaModulation, U::Memory.GetVirtual(I::StudioRender, 28), void,
void* rcx, float flAlpha)
{
#ifdef DEBUG_HOOKS
@@ -1,6 +1,6 @@
#include "../SDK/SDK.h"
MAKE_HOOK(CStudioRender_SetColorModulation, U::Memory.GetVFunc(I::StudioRender, 27), void,
MAKE_HOOK(CStudioRender_SetColorModulation, U::Memory.GetVirtual(I::StudioRender, 27), void,
void* rcx, const float* pColor)
{
#ifdef DEBUG_HOOKS
@@ -10,5 +10,5 @@ MAKE_HOOK(CTFPlayerInventory_GetMaxItemCount, S::CTFPlayerInventory_GetMaxItemCo
return CALL_ORIGINAL(rcx);
#endif
return !Vars::Misc::Automation::BackpackExpander.Value ? CALL_ORIGINAL(rcx) : 4000;
return !Vars::Misc::Exploits::BackpackExpander.Value ? CALL_ORIGINAL(rcx) : 4000;
}
@@ -2,42 +2,39 @@
#include "../Features/Visuals/Visuals.h"
MAKE_SIGNATURE(CBaseEntity_FireBullets, "client.dll", "48 89 74 24 ? 55 57 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? F3 41 0F 10 58", 0x0);
MAKE_SIGNATURE(CTFPlayer_FireBullet, "client.dll", "48 89 74 24 ? 55 57 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? F3 41 0F 10 58", 0x0);
MAKE_HOOK(CBaseEntity_FireBullets, S::CBaseEntity_FireBullets(), void,
MAKE_HOOK(CTFPlayer_FireBullet, S::CTFPlayer_FireBullet(), void,
void* rcx, CBaseCombatWeapon* pWeapon, const FireBulletsInfo_t& info, bool bDoEffects, int nDamageType, int nCustomDamageType)
{
#ifdef DEBUG_HOOKS
if (!Vars::Hooks::CBaseEntity_FireBullets[DEFAULT_BIND])
if (!Vars::Hooks::CTFPlayer_FireBullet[DEFAULT_BIND])
return CALL_ORIGINAL(rcx, pWeapon, info, nDamageType, nDamageType, nCustomDamageType);
#endif
auto pLocal = H::Entities.GetLocal();
auto pPlayer = reinterpret_cast<CBaseEntity*>(rcx);
if (!pLocal || pPlayer != pLocal)
auto pLocal = reinterpret_cast<CTFPlayer*>(rcx);
if (pLocal != H::Entities.GetLocal() || !pWeapon)
return CALL_ORIGINAL(rcx, pWeapon, info, bDoEffects, nDamageType, nCustomDamageType);
auto& sString = nDamageType & DMG_CRITICAL ? Vars::Visuals::Effects::CritTracer.Value : Vars::Visuals::Effects::BulletTracer.Value;
auto uHash = FNV1A::Hash32(sString.c_str());
if (uHash == FNV1A::Hash32Const("Default"))
return CALL_ORIGINAL(rcx, pWeapon, info, bDoEffects, nDamageType, nCustomDamageType);
else if (uHash == FNV1A::Hash32Const("None"))
return;
const Vec3 vStart = info.m_vecSrc;
const Vec3 vEnd = vStart + info.m_vecDirShooting * info.m_flDistance;
CGameTrace trace = {};
CTraceFilterHitscan filter = {}; filter.pSkip = pLocal;
SDK::Trace(vStart, vEnd, MASK_SHOT | CONTENTS_GRATE, &filter, &trace);
const int iTeam = pLocal->m_iTeamNum();
const int iAttachment = pWeapon->LookupAttachment("muzzle");
pWeapon->GetAttachment(iAttachment, trace.startpos);
const bool bCrit = nDamageType & DMG_CRITICAL || pLocal->IsCritBoosted();
const int iTeam = pLocal->m_iTeamNum();
auto& sString = bCrit ? Vars::Visuals::Effects::CritTracer.Value : Vars::Visuals::Effects::BulletTracer.Value;
auto uHash = FNV1A::Hash32(sString.c_str());
if (!pLocal->IsInValidTeam() || uHash == FNV1A::Hash32Const("Default"))
return CALL_ORIGINAL(rcx, pWeapon, info, bDoEffects, nDamageType, nCustomDamageType);
switch (uHash)
{
case FNV1A::Hash32Const("None"):
return;
case FNV1A::Hash32Const("Big nasty"):
H::Particles.ParticleTracer(iTeam == TF_TEAM_RED ? "bullet_bignasty_tracer01_blue" : "bullet_bignasty_tracer01_red", trace.startpos, trace.endpos, pLocal->entindex(), iAttachment, true);
break;
@@ -89,7 +86,7 @@ MAKE_HOOK(CBaseEntity_FireBullets, S::CBaseEntity_FireBullets(), void,
{
BeamInfo_t beamInfo;
beamInfo.m_nType = 0;
beamInfo.m_pszModelName = FNV1A::Hash32(Vars::Visuals::Beams::Model.Value.c_str()) != FNV1A::Hash32Const("") ? Vars::Visuals::Beams::Model.Value.c_str() : "sprites/physbeam.vmt";
beamInfo.m_pszModelName = !Vars::Visuals::Beams::Model.Value.empty() ? Vars::Visuals::Beams::Model.Value.c_str() : "sprites/physbeam.vmt";
beamInfo.m_nModelIndex = -1; // will be set by CreateBeamPoints if its -1
beamInfo.m_flHaloScale = 0.0f;
beamInfo.m_flLife = Vars::Visuals::Beams::Life.Value;
@@ -0,0 +1,55 @@
#include "../SDK/SDK.h"
MAKE_SIGNATURE(CTFRocketLauncher_CheckReloadMisfire, "client.dll", "48 83 EC ? E8 ? ? ? ? 32 C0", 0x0);
MAKE_SIGNATURE(CTFRocketLauncher_FireProjectile, "client.dll", "48 89 74 24 ? 57 48 81 EC ? ? ? ? 48 8B FA 48 89 9C 24", 0x0);
MAKE_HOOK(CTFRocketLauncher_CheckReloadMisfire, S::CTFRocketLauncher_CheckReloadMisfire(), bool,
void* rcx)
{
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
if (!SDK::AttribHookValue(0, "can_overload", pWeapon))
return false;
auto pPlayer = pWeapon->m_hOwner().Get()->As<CTFPlayer>();
int iClip1 = pWeapon->m_iClip1();
if (pWeapon->m_bRemoveable()) // just using this var since it's in the datamap and doesn't seem to be used on the client
{
if (iClip1 > 0)
{
pWeapon->CalcIsAttackCritical();
return true;
}
else
pWeapon->m_bRemoveable() = false;
}
else if (iClip1 >= pWeapon->GetMaxClip1() || iClip1 > 0 && pPlayer && pPlayer->GetAmmoCount(pWeapon->m_iPrimaryAmmoType()) == 0)
{
pWeapon->CalcIsAttackCritical();
pWeapon->m_bRemoveable() = true;
return true;
}
return false;
}
MAKE_HOOK(CTFRocketLauncher_FireProjectile, S::CTFRocketLauncher_FireProjectile(), CBaseEntity*,
void* rcx, CTFPlayer* pPlayer)
{
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
pWeapon->m_bRemoveable() = false;
return CALL_ORIGINAL(rcx, pPlayer);
}
// more accurate way to track this? either way doesn't matter too much
/*
MAKE_SIGNATURE(CTFBat_Wood_LaunchBall, "client.dll", "40 53 48 83 EC ? 48 8B D9 E8 ? ? ? ? 48 85 C0 74 ? 48 8B CB 48 83 C4 ? 5B E9 ? ? ? ? 48 83 C4 ? 5B C3 CC CC CC CC CC CC CC CC CC CC 48 89 5C 24", 0x0);
MAKE_HOOK(CTFBat_Wood_LaunchBall, S::CTFBat_Wood_LaunchBall(), void,
void* rcx)
{
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
pWeapon->CalcIsAttackCritical();
return CALL_ORIGINAL(rcx);
}
*/
@@ -2,8 +2,6 @@
#include "../Features/CritHack/CritHack.h"
MAKE_SIGNATURE(CTFWeaponBase_CalcIsAttackCritical, "client.dll", "48 89 74 24 ? 57 48 83 EC ? 48 8B F9 E8 ? ? ? ? 48 8B C8 C7 44 24 ? ? ? ? ? 4C 8D 0D ? ? ? ? 33 D2 4C 8D 05 ? ? ? ? E8 ? ? ? ? 48 8B F0 48 85 C0 0F 84 ? ? ? ? 48 8B 10", 0x0);
MAKE_HOOK(CTFWeaponBase_CalcIsAttackCritical, S::CTFWeaponBase_CalcIsAttackCritical(), void,
void* rcx)
{
@@ -12,16 +10,14 @@ MAKE_HOOK(CTFWeaponBase_CalcIsAttackCritical, S::CTFWeaponBase_CalcIsAttackCriti
return CALL_ORIGINAL(rcx);
#endif
auto pLocal = H::Entities.GetLocal();
auto pWeapon = H::Entities.GetWeapon();
if (!pLocal || !pWeapon || pWeapon != rcx)
if (pWeapon != rcx)
CALL_ORIGINAL(rcx);
if (!F::CritHack.CalcIsAttackCriticalHandler(pLocal, pWeapon))
return;
const auto nPreviousWeaponMode = pWeapon->m_iWeaponMode();
pWeapon->m_iWeaponMode() = 0;
CALL_ORIGINAL(rcx);
pWeapon->m_iWeaponMode() = nPreviousWeaponMode;
else if (F::CritHack.CalcIsAttackCriticalHandler())
{
const auto nPreviousWeaponMode = pWeapon->m_iWeaponMode();
pWeapon->m_iWeaponMode() = TF_WEAPON_PRIMARY_MODE;
CALL_ORIGINAL(rcx);
pWeapon->m_iWeaponMode() = nPreviousWeaponMode;
}
}
+1 -1
View File
@@ -9,7 +9,7 @@
#include "../Features/Resolver/Resolver.h"
#include "../Features/Spectate/Spectate.h"
MAKE_HOOK(CViewRender_LevelInit, U::Memory.GetVFunc(I::ViewRender, 1), void,
MAKE_HOOK(CViewRender_LevelInit, U::Memory.GetVirtual(I::ViewRender, 1), void,
void* rcx)
{
#ifdef DEBUG_HOOKS
@@ -2,7 +2,7 @@
#include "../Features/Spectate/Spectate.h"
MAKE_HOOK(CViewRender_LevelShutdown, U::Memory.GetVFunc(I::ViewRender, 2), void,
MAKE_HOOK(CViewRender_LevelShutdown, U::Memory.GetVirtual(I::ViewRender, 2), void,
void* rcx)
{
F::Spectate.m_iIntendedTarget = -1;
+1 -1
View File
@@ -2,7 +2,7 @@
#include "../Features/Visuals/CameraWindow/CameraWindow.h"
MAKE_HOOK(CViewRender_RenderView, U::Memory.GetVFunc(I::ViewRender, 6), void,
MAKE_HOOK(CViewRender_RenderView, U::Memory.GetVirtual(I::ViewRender, 6), void,
void* rcx, const CViewSetup& view, ClearFlags_t nClearFlags, RenderViewInfo_t whatToDraw)
{
#ifdef DEBUG_HOOKS
+2 -1
View File
@@ -13,7 +13,7 @@ enum cmd_source_t
static std::string sCmdString;
#define PRE_STR "\x07\x07\x07\x07\x07\x07\x07"
#define PRE_STR "\x7\x7\x7\x7\x7\x7\x7"
static std::vector<std::pair<std::string, std::string>> vStatic = {
{ "\\x1", "\x1" },
{ "\\x01", "\x1" },
@@ -43,6 +43,7 @@ static std::vector<std::pair<std::string, std::string>> vStatic = {
{ "\\{orange}", PRE_STR"\x7""ff7000" },
{ "\\{purple}", PRE_STR"\x7""7f00ff" },
{ "\\{brown}", PRE_STR"\x7""583927" },
{ "\\{gold}", PRE_STR"\x7""c8a900" },
{ "\\{gray}", PRE_STR"\x7""cccccc" },
{ "\\{black}", PRE_STR"\x7""000000" },
{ "\\{bluteam}", PRE_STR"\x7""99ccff" },
+4 -4
View File
@@ -6,7 +6,7 @@
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
MAKE_HOOK(Direct3DDevice9_Present, U::Memory.GetVFunc(I::DirectXDevice, 17), HRESULT,
MAKE_HOOK(Direct3DDevice9_Present, U::Memory.GetVirtual(I::DirectXDevice, 17), HRESULT,
IDirect3DDevice9* pDevice, const RECT* pSource, const RECT* pDestination, const RGNDATA* pDirtyRegion)
{
if (!G::Unload)
@@ -15,7 +15,7 @@ MAKE_HOOK(Direct3DDevice9_Present, U::Memory.GetVFunc(I::DirectXDevice, 17), HRE
return CALL_ORIGINAL(pDevice, pSource, pDestination, pDirtyRegion);
}
MAKE_HOOK(Direct3DDevice9_Reset, U::Memory.GetVFunc(I::DirectXDevice, 16), HRESULT,
MAKE_HOOK(Direct3DDevice9_Reset, U::Memory.GetVirtual(I::DirectXDevice, 16), HRESULT,
LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
{
ImGui_ImplDX9_InvalidateDeviceObjects();
@@ -43,7 +43,7 @@ LONG __stdcall WndProc::Func(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return CallWindowProc(Original, hWnd, uMsg, wParam, lParam);
}
MAKE_HOOK(VGuiSurface_LockCursor, U::Memory.GetVFunc(I::MatSystemSurface, 62), void,
MAKE_HOOK(VGuiSurface_LockCursor, U::Memory.GetVirtual(I::MatSystemSurface, 62), void,
void* rcx)
{
if (F::Menu.m_bIsOpen)
@@ -52,7 +52,7 @@ MAKE_HOOK(VGuiSurface_LockCursor, U::Memory.GetVFunc(I::MatSystemSurface, 62), v
CALL_ORIGINAL(rcx);
}
MAKE_HOOK(VGuiSurface_SetCursor, U::Memory.GetVFunc(I::MatSystemSurface, 51), void,
MAKE_HOOK(VGuiSurface_SetCursor, U::Memory.GetVirtual(I::MatSystemSurface, 51), void,
void* rcx, HCursor cursor)
{
if (F::Menu.m_bIsOpen)
+2 -2
View File
@@ -8,7 +8,7 @@ MAKE_SIGNATURE(FX_FireBullets, "client.dll", "48 89 5C 24 ? 48 89 74 24 ? 4C 89
MAKE_SIGNATURE(CTFWeaponBaseGun_FireBullet_FireBullets_Call, "client.dll", "0F 28 7C 24 ? 4C 8D 9C 24 ? ? ? ? 49 8B 5B ? 49 8B 6B ? 49 8B 73 ? 41 0F 28 73 ? 49 8B E3", 0x0);
MAKE_HOOK(FX_FireBullets, S::FX_FireBullets(), void,
void* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
CTFWeaponBase* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
{
#ifdef DEBUG_HOOKS
if (!Vars::Hooks::FX_FireBullets[DEFAULT_BIND])
@@ -30,7 +30,7 @@ MAKE_HOOK(FX_FireBullets, S::FX_FireBullets(), void,
MAKE_SIGNATURE(FX_FireBullets_Server, "server.dll", "48 89 5C 24 ? 4C 89 4C 24 ? 55 56 41 54", 0x0);
MAKE_HOOK(FX_FireBullets_Server, S::FX_FireBullets_Server(), void,
void* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
CTFWeaponBase* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
{
#ifdef DEBUG_HOOKS
if (!Vars::Hooks::FX_FireBullets[DEFAULT_BIND])
@@ -5,8 +5,6 @@
#include "../Features/NoSpread/NoSpreadHitscan/NoSpreadHitscan.h"
#include "../Features/Misc/AutoVote/AutoVote.h"
#include "../Features/Aimbot/AutoHeal/AutoHeal.h"
#include <boost/algorithm/string/replace.hpp>
#include <boost/algorithm/string/predicate.hpp>
//#define DEBUG_VISUALS
#ifdef DEBUG_VISUALS
@@ -14,7 +12,7 @@
#include <boost/algorithm/string/classification.hpp>
#endif
MAKE_HOOK(IBaseClientDLL_DispatchUserMessage, U::Memory.GetVFunc(I::BaseClientDLL, 36), bool,
MAKE_HOOK(IBaseClientDLL_DispatchUserMessage, U::Memory.GetVirtual(I::BaseClientDLL, 36), bool,
void* rcx, UserMessageType type, bf_read& msgData)
{
#ifdef DEBUG_HOOKS
@@ -13,7 +13,7 @@
#include "../Features/Spectate/Spectate.h"
#include "../Features/Binds/Binds.h"
MAKE_HOOK(IBaseClientDLL_FrameStageNotify, U::Memory.GetVFunc(I::BaseClientDLL, 35), void,
MAKE_HOOK(IBaseClientDLL_FrameStageNotify, U::Memory.GetVirtual(I::BaseClientDLL, 35), void,
void* rcx, ClientFrameStage_t curStage)
{
#ifdef DEBUG_HOOKS
@@ -2,7 +2,7 @@
#include "../Features/Misc/Misc.h"
MAKE_HOOK(IBaseClientDLL_LevelShutdown, U::Memory.GetVFunc(I::BaseClientDLL, 7), void,
MAKE_HOOK(IBaseClientDLL_LevelShutdown, U::Memory.GetVirtual(I::BaseClientDLL, 7), void,
void* rcx)
{
#ifdef DEBUG_HOOKS
@@ -38,7 +38,7 @@ struct TraceInfo_t
static int iOriginalMask = false;
static bool bOriginalStartSolid = false;
MAKE_HOOK(IEngineTrace_SetTraceEntity, U::Memory.GetVFunc(I::EngineTrace, 20), void,
MAKE_HOOK(IEngineTrace_SetTraceEntity, U::Memory.GetVirtual(I::EngineTrace, 20), void,
void* rcx, ICollideable* pCollideable, trace_t* pTrace)
{
#ifdef DEBUG_HOOKS
+1 -1
View File
@@ -1,7 +1,7 @@
#include "../SDK/SDK.h"
#ifdef DEBUG_TRACES
MAKE_HOOK(IEngineTrace_TraceRay, U::Memory.GetVFunc(I::EngineTrace, 4), void,
MAKE_HOOK(IEngineTrace_TraceRay, U::Memory.GetVirtual(I::EngineTrace, 4), void,
void* rcx, const Ray_t& ray, unsigned int fMask, ITraceFilter* pTraceFilter, trace_t* pTrace)
{
#ifdef DEBUG_HOOKS
+3 -1
View File
@@ -13,8 +13,9 @@
#include "../Features/Visuals/ESP/ESP.h"
#include "../Features/Visuals/CameraWindow/CameraWindow.h"
#include "../Features/Visuals/Notifications/Notifications.h"
//#include "../Features/Aimbot/AutoHeal/AutoHeal.h"
MAKE_HOOK(IEngineVGui_Paint, U::Memory.GetVFunc(I::EngineVGui, 14), void,
MAKE_HOOK(IEngineVGui_Paint, U::Memory.GetVirtual(I::EngineVGui, 14), void,
void* rcx, int iMode)
{
#ifdef DEBUG_HOOKS
@@ -42,6 +43,7 @@ MAKE_HOOK(IEngineVGui_Paint, U::Memory.GetVFunc(I::EngineVGui, 14), void,
F::Aimbot.Draw(pLocal);
F::Radar.Run(pLocal);
//F::AutoHeal.Draw(pLocal);
F::NoSpreadHitscan.Draw(pLocal);
F::PlayerConditions.Draw(pLocal);
F::Backtrack.Draw(pLocal);
Loaded 100 of 162 files, more files were not shown because too many files have changed in this diff. Show more