From b06a140b16d070fc589b6c9f7610a08ac2a35d56 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Mon, 17 Apr 2017 13:20:02 +0300 Subject: [PATCH] autosticky dead autobackstab invis --- src/hacks/AntiBackstab.cpp | 1 + src/hacks/AutoSticky.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/hacks/AntiBackstab.cpp b/src/hacks/AntiBackstab.cpp index 9469b2b2..e0223c0c 100644 --- a/src/hacks/AntiBackstab.cpp +++ b/src/hacks/AntiBackstab.cpp @@ -47,6 +47,7 @@ CachedEntity* ClosestSpy() { if (CE_BYTE(ent, netvar.iLifeState)) continue; if (CE_INT(ent, netvar.iClass) != tf_class::tf_spy) continue; if (CE_INT(ent, netvar.iTeamNum) == g_pLocalPlayer->team) continue; + if (IsPlayerInvisible(ent)) continue; float dist = ent->m_flDistance; if (fabs(GetAngle(ent)) > (float)angle) { break; diff --git a/src/hacks/AutoSticky.cpp b/src/hacks/AutoSticky.cpp index de1e591c..65eedfc0 100644 --- a/src/hacks/AutoSticky.cpp +++ b/src/hacks/AutoSticky.cpp @@ -22,6 +22,9 @@ bool ShouldDetonate(CachedEntity* bomb) { if (CE_BAD(ent)) continue; if (ent->m_Type != ENTITY_PLAYER && (ent->m_Type != ENTITY_BUILDING || !buildings)) continue; if (ent->m_iTeam == CE_INT(bomb, netvar.iTeamNum)) continue; + if (ent->m_Type == ENTITY_PLAYER) { + if (CE_BYTE(ent, netvar.iLifeState) != LIFE_ALIVE) continue; + } if (ent->m_vecOrigin.DistToSqr(bomb->m_vecOrigin) > SQR((float)distance)) continue; return true; }