Added "Wait for charge"

This commit is contained in:
nullifiedcat 2017-04-10 15:02:06 +03:00
parent a0ea76f45b
commit 9cdff0b93f
2 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,7 @@ List& MainList() {
"aimbot_proj_fovpred"
"aimbot_proj_vispred"
"aimbot_interp"
"aimbot_charge"
"Auto Heal" [
"Auto Heal Menu"
"autoheal_enabled"

View File

@ -187,10 +187,21 @@ void Reset() {
projectile_mode = false;
}
static CatVar wait_for_charge(CV_SWITCH, "aimbot_charge", "0", "Wait for sniper rifle charge");
int ShouldTarget(CachedEntity* entity) {
// Just assuming CE is good
// TODO IsSniperRifle.. ugh
if (entity->m_Type == ENTITY_PLAYER) {
if (TF) {
// idk wtf
if (wait_for_charge && (g_pLocalPlayer->weapon()->m_iClassID == g_pClassID->CTFSniperRifle || g_pLocalPlayer->weapon()->m_iClassID == g_pClassID->CTFSniperRifleDecap)) {
float bdmg = CE_FLOAT(g_pLocalPlayer->weapon(), netvar.flChargedDamage);
if (g_GlobalVars->curtime - g_pLocalPlayer->flZoomBegin <= 1.0f) bdmg = 50.0f;
if ((bdmg * 3) < entity->m_iHealth) {
return 28;
}
}
if (ignore_taunting && HasCondition(entity, TFCond_Taunting)) return 1;
if (IsPlayerInvulnerable(entity)) return 4;
if (respect_cloak && IsPlayerInvisible(entity)) return 6;