Remove redundant sapper checks

This commit is contained in:
BenCat07 2022-07-14 01:31:02 +02:00
parent d2cb483124
commit c5a894400c

View File

@ -901,8 +901,6 @@ bool IsTargetStateGood(CachedEntity *entity)
} }
} }
// don't aim if holding sapper
// Wait for charge // Wait for charge
if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle)
{ {
@ -1011,11 +1009,8 @@ bool IsTargetStateGood(CachedEntity *entity)
// Check for buildings // Check for buildings
case (ENTITY_BUILDING): case (ENTITY_BUILDING):
{ {
// Don't aim if holding sapper
if (g_pLocalPlayer->holding_sapper)
return false;
// Enabled check // Enabled check
else if (!(buildings_other || buildings_sentry)) if (!(buildings_other || buildings_sentry))
return false; return false;
// Teammates, Even with friendly fire enabled, buildings can NOT be // Teammates, Even with friendly fire enabled, buildings can NOT be
// damaged // damaged
@ -1054,12 +1049,8 @@ bool IsTargetStateGood(CachedEntity *entity)
{ {
// NPCs (Skeletons, Merasmus, etc) // NPCs (Skeletons, Merasmus, etc)
// Sapper aimbot? no.
if (g_pLocalPlayer->holding_sapper)
return false;
// NPC targeting is disabled // NPC targeting is disabled
else if (!npcs) if (!npcs)
return false; return false;
// Cannot shoot this // Cannot shoot this