Merge pull request #962 from surepy/master
Add more vaccinator autoshoot checks and ESP details
This commit is contained in:
commit
ccdf710b6e
@ -15,14 +15,6 @@ class CachedEntity;
|
|||||||
|
|
||||||
namespace player_tools
|
namespace player_tools
|
||||||
{
|
{
|
||||||
enum class IgnoreReason
|
|
||||||
{
|
|
||||||
DO_NOT_IGNORE,
|
|
||||||
IS_HOOVY,
|
|
||||||
IS_TAUNTING,
|
|
||||||
LOCAL_PLAYER_LIST,
|
|
||||||
OTHER
|
|
||||||
};
|
|
||||||
|
|
||||||
bool shouldTargetSteamId(unsigned id);
|
bool shouldTargetSteamId(unsigned id);
|
||||||
bool shouldTarget(CachedEntity *player);
|
bool shouldTarget(CachedEntity *player);
|
||||||
|
@ -73,6 +73,7 @@ bool IsPlayerInvulnerable(CachedEntity *player);
|
|||||||
bool IsPlayerCritBoosted(CachedEntity *player);
|
bool IsPlayerCritBoosted(CachedEntity *player);
|
||||||
bool IsPlayerInvisible(CachedEntity *player);
|
bool IsPlayerInvisible(CachedEntity *player);
|
||||||
bool IsPlayerDisguised(CachedEntity *player);
|
bool IsPlayerDisguised(CachedEntity *player);
|
||||||
|
bool IsPlayerResistantToCurrentWeapon(CachedEntity *player);
|
||||||
|
|
||||||
const char *GetBuildingName(CachedEntity *ent);
|
const char *GetBuildingName(CachedEntity *ent);
|
||||||
Vector GetBuildingPosition(CachedEntity *ent);
|
Vector GetBuildingPosition(CachedEntity *ent);
|
||||||
|
@ -38,6 +38,7 @@ bool shouldTargetSteamId(unsigned id)
|
|||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool shouldTarget(CachedEntity *entity)
|
bool shouldTarget(CachedEntity *entity)
|
||||||
{
|
{
|
||||||
if (entity->m_Type() == ENTITY_PLAYER)
|
if (entity->m_Type() == ENTITY_PLAYER)
|
||||||
@ -53,7 +54,6 @@ bool shouldTarget(CachedEntity *entity)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool shouldAlwaysRenderEspSteamId(unsigned id)
|
bool shouldAlwaysRenderEspSteamId(unsigned id)
|
||||||
{
|
{
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
|
@ -628,9 +628,8 @@ bool IsTargetStateGood(CachedEntity *entity)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Vaccinator
|
// Vaccinator
|
||||||
if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan || LOCAL_W->m_iClassID() == CL_CLASS(CTFCompoundBow))
|
if (ignore_vaccinator && IsPlayerResistantToCurrentWeapon(entity))
|
||||||
if (ignore_vaccinator && HasCondition<TFCond_UberBulletResist>(entity))
|
return false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preform hitbox prediction
|
// Preform hitbox prediction
|
||||||
|
@ -1209,11 +1209,27 @@ void _FASTCALL ProcessEntity(CachedEntity *ent)
|
|||||||
// Vaccinator
|
// Vaccinator
|
||||||
if (HasCondition<TFCond_UberBulletResist>(ent))
|
if (HasCondition<TFCond_UberBulletResist>(ent))
|
||||||
{
|
{
|
||||||
AddEntityString(ent, "*VACCINATOR*");
|
AddEntityString(ent, "*BULLET VACCINATOR*", colors::FromRGBA8(220, 220, 220, 255));
|
||||||
}
|
}
|
||||||
else if (HasCondition<TFCond_SmallBulletResist>(ent))
|
else if (HasCondition<TFCond_SmallBulletResist>(ent))
|
||||||
{
|
{
|
||||||
AddEntityString(ent, "*PASSIVE RESIST*");
|
AddEntityString(ent, "*BULLET PASSIVE*");
|
||||||
|
}
|
||||||
|
if (HasCondition<TFCond_UberFireResist>(ent))
|
||||||
|
{
|
||||||
|
AddEntityString(ent, "*FIRE VACCINATOR*", colors::FromRGBA8(220, 220, 220, 255));
|
||||||
|
}
|
||||||
|
else if (HasCondition<TFCond_SmallFireResist>(ent))
|
||||||
|
{
|
||||||
|
AddEntityString(ent, "*FIRE PASSIVE*");
|
||||||
|
}
|
||||||
|
if (HasCondition<TFCond_UberBlastResist>(ent))
|
||||||
|
{
|
||||||
|
AddEntityString(ent, "*BLAST VACCINATOR*", colors::FromRGBA8(220, 220, 220, 255));
|
||||||
|
}
|
||||||
|
else if (HasCondition<TFCond_SmallBlastResist>(ent))
|
||||||
|
{
|
||||||
|
AddEntityString(ent, "*BLAST PASSIVE*");
|
||||||
}
|
}
|
||||||
// Crit
|
// Crit
|
||||||
if (IsPlayerCritBoosted(ent))
|
if (IsPlayerCritBoosted(ent))
|
||||||
|
@ -269,9 +269,8 @@ bool IsTargetStateGood(CachedEntity *entity, bool backtrack)
|
|||||||
if (ignore_cloak && IsPlayerInvisible(entity))
|
if (ignore_cloak && IsPlayerInvisible(entity))
|
||||||
return false;
|
return false;
|
||||||
// If settings allow, dont target vaccinated players
|
// If settings allow, dont target vaccinated players
|
||||||
if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan || LOCAL_W->m_iClassID() == CL_CLASS(CTFCompoundBow))
|
if (ignore_vaccinator && IsPlayerResistantToCurrentWeapon(entity))
|
||||||
if (ignore_vaccinator && HasCondition<TFCond_UberBulletResist>(entity))
|
return false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Head hitbox detection
|
// Head hitbox detection
|
||||||
|
@ -1344,6 +1344,44 @@ bool IsPlayerDisguised(CachedEntity *player)
|
|||||||
return HasConditionMask<KDisguisedMask.cond_0, KDisguisedMask.cond_1, KDisguisedMask.cond_2, KDisguisedMask.cond_3>(player);
|
return HasConditionMask<KDisguisedMask.cond_0, KDisguisedMask.cond_1, KDisguisedMask.cond_2, KDisguisedMask.cond_3>(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool IsPlayerResistantToCurrentWeapon(CachedEntity *player)
|
||||||
|
{
|
||||||
|
switch (LOCAL_W->m_iClassID())
|
||||||
|
{
|
||||||
|
case CL_CLASS(CTFRocketLauncher_DirectHit):
|
||||||
|
case CL_CLASS(CTFRocketLauncher_AirStrike):
|
||||||
|
case CL_CLASS(CTFRocketLauncher_Mortar): // doesn't exist yet
|
||||||
|
case CL_CLASS(CTFRocketLauncher):
|
||||||
|
case CL_CLASS(CTFParticleCannon):
|
||||||
|
case CL_CLASS(CTFGrenadeLauncher):
|
||||||
|
case CL_CLASS(CTFPipebombLauncher):
|
||||||
|
if (HasCondition<TFCond_UberBlastResist>(player))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case CL_CLASS(CTFCompoundBow):
|
||||||
|
case CL_CLASS(CTFSyringeGun):
|
||||||
|
case CL_CLASS(CTFCrossbow):
|
||||||
|
case CL_CLASS(CTFShotgunBuildingRescue):
|
||||||
|
case CL_CLASS(CTFDRGPomson):
|
||||||
|
case CL_CLASS(CTFRaygun):
|
||||||
|
if (HasCondition<TFCond_UberBulletResist>(player))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
case CL_CLASS(CTFWeaponFlameBall):
|
||||||
|
case CL_CLASS(CTFFlareGun):
|
||||||
|
case CL_CLASS(CTFFlareGun_Revenge):
|
||||||
|
case CL_CLASS(CTFFlameRocket):
|
||||||
|
case CL_CLASS(CTFFlameThrower):
|
||||||
|
if (HasCondition<TFCond_UberFireResist>(player))
|
||||||
|
return true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan && HasCondition<TFCond_UberBulletResist>(player))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// F1 c&p
|
// F1 c&p
|
||||||
Vector CalcAngle(Vector src, Vector dst)
|
Vector CalcAngle(Vector src, Vector dst)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user