Add files via upload
This commit is contained in:
parent
b2c0fc2948
commit
607019470f
@ -138,7 +138,7 @@ static bool doLegitBackstab()
|
|||||||
return false;
|
return false;
|
||||||
int index = reinterpret_cast<IClientEntity *>(trace.m_pEnt)->entindex();
|
int index = reinterpret_cast<IClientEntity *>(trace.m_pEnt)->entindex();
|
||||||
auto ent = ENTITY(index);
|
auto ent = ENTITY(index);
|
||||||
if (index == 0 || index > g_IEngine->GetMaxClients() || !ent->m_bEnemy() || !player_tools::shouldTarget(ent))
|
if (index == 0 || index > g_IEngine->GetMaxClients() || !ent->m_bEnemy() || !player_tools::shouldTarget(ent) || IsPlayerInvulnerable(ent))
|
||||||
return false;
|
return false;
|
||||||
if (angleCheck(ENTITY(index), std::nullopt, g_pLocalPlayer->v_OrigViewangles) || canFaceStab(ENTITY(index)))
|
if (angleCheck(ENTITY(index), std::nullopt, g_pLocalPlayer->v_OrigViewangles) || canFaceStab(ENTITY(index)))
|
||||||
{
|
{
|
||||||
@ -158,7 +158,7 @@ static bool doRageBackstab()
|
|||||||
for (int i = 1; i <= g_IEngine->GetMaxClients(); i++)
|
for (int i = 1; i <= g_IEngine->GetMaxClients(); i++)
|
||||||
{
|
{
|
||||||
auto ent = ENTITY(i);
|
auto ent = ENTITY(i);
|
||||||
if (CE_BAD(ent) || ent->m_flDistance() > swingrange * 4 || !ent->m_bEnemy() || !ent->m_bAlivePlayer() || g_pLocalPlayer->entity_idx == ent->m_IDX)
|
if (CE_BAD(ent) || ent->m_flDistance() > swingrange * 4 || !ent->m_bEnemy() || !ent->m_bAlivePlayer() || g_pLocalPlayer->entity_idx == ent->m_IDX || IsPlayerInvulnerable(ent))
|
||||||
continue;
|
continue;
|
||||||
if (!player_tools::shouldTarget(ent))
|
if (!player_tools::shouldTarget(ent))
|
||||||
continue;
|
continue;
|
||||||
@ -204,7 +204,7 @@ static bool doRageBackstab()
|
|||||||
{
|
{
|
||||||
int index = reinterpret_cast<IClientEntity *>(trace.m_pEnt)->entindex();
|
int index = reinterpret_cast<IClientEntity *>(trace.m_pEnt)->entindex();
|
||||||
auto ent = ENTITY(index);
|
auto ent = ENTITY(index);
|
||||||
if (index == 0 || index > PLAYER_ARRAY_SIZE || !ent->m_bEnemy() || !player_tools::shouldTarget(ent))
|
if (index == 0 || index > PLAYER_ARRAY_SIZE || !ent->m_bEnemy() || !player_tools::shouldTarget(ent) || IsPlayerInvulnerable(ent))
|
||||||
continue;
|
continue;
|
||||||
if (angleCheck(ent, std::nullopt, newangle))
|
if (angleCheck(ent, std::nullopt, newangle))
|
||||||
{
|
{
|
||||||
@ -276,7 +276,7 @@ static bool doBacktrackStab(bool legit = false)
|
|||||||
{
|
{
|
||||||
CachedEntity *ent = ENTITY(i);
|
CachedEntity *ent = ENTITY(i);
|
||||||
// Targeting checks
|
// Targeting checks
|
||||||
if (CE_BAD(ent) || !ent->m_bAlivePlayer() || !ent->m_bEnemy() || !player_tools::shouldTarget(ent))
|
if (CE_BAD(ent) || !ent->m_bAlivePlayer() || !ent->m_bEnemy() || !player_tools::shouldTarget(ent)|| IsPlayerInvulnerable(ent))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Get the best tick for that ent
|
// Get the best tick for that ent
|
||||||
|
Reference in New Issue
Block a user