Add no invis

This commit is contained in:
BenCat07 2018-04-08 20:18:55 +02:00
parent 7beb76fcd9
commit 39ea660e6d
2 changed files with 20 additions and 4 deletions

View File

@ -16,10 +16,27 @@ namespace antidisguise
CatVar enabled(CV_SWITCH, "antidisguise", "0", "Remove spy disguise",
"Removes the disguise from spys\nUsefull for aimbot");
static CatVar no_invisibility(CV_SWITCH, "no_invis", "0", "Remove Invisibility",
"Useful with chams!");
void Draw()
{
CachedEntity *ent;
if (no_invisibility)
for (int i = 0; i < 32 && i < HIGHEST_ENTITY; i++)
{
ent = ENTITY(i);
if (CE_BAD(ent))
continue;
if (ent->m_Type == ENTITY_PLAYER)
{
if (CE_INT(ent, netvar.iClass) == tf_class::tf_spy)
{
RemoveCondition<TFCond_Cloaked>(ent);
RemoveCondition<TFCond_CloakFlicker>(ent);
}
}
}
if (!enabled)
return;
for (int i = 0; i < 32 && i < HIGHEST_ENTITY; i++)

View File

@ -15,13 +15,12 @@
#if ENABLE_VISUALS == 1
static CatVar no_invisibility(CV_SWITCH, "no_invis", "0", "Remove Invisibility",
"Useful with chams!");
static CatVar medal_flip(CV_SWITCH, "medal_flip", "0", "Infinite Medal Flip",
"");
// This hook isn't used yet!
int C_TFPlayer__DrawModel_hook(IClientEntity *_this, int flags)
/*int C_TFPlayer__DrawModel_hook(IClientEntity *_this, int flags)
{
float old_invis = *(float *) ((uintptr_t) _this + 79u);
if (no_invisibility)
@ -33,7 +32,7 @@ int C_TFPlayer__DrawModel_hook(IClientEntity *_this, int flags)
}
*(float *) ((uintptr_t) _this + 79u) = old_invis;
}
}*/
static CatVar no_arms(CV_SWITCH, "no_arms", "0", "No Arms",
"Removes arms from first person");