From 9d10930f9d99eb8eb4340b350975b64bcbac6242 Mon Sep 17 00:00:00 2001 From: Julian Rowe Date: Tue, 25 Apr 2017 22:31:58 -0500 Subject: [PATCH 1/7] Added broken pitch slow aim --- src/gui/ncc/Menu.cpp | 8 +++- src/hacks/Aimbot.cpp | 99 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 92 insertions(+), 15 deletions(-) diff --git a/src/gui/ncc/Menu.cpp b/src/gui/ncc/Menu.cpp index 3a41f8c9..a2ae0eff 100644 --- a/src/gui/ncc/Menu.cpp +++ b/src/gui/ncc/Menu.cpp @@ -240,10 +240,12 @@ static const std::string list_tf2 = R"( "aimbot_aimkey" "aimbot_aimkey_mode" "aimbot_autoshoot" - "aimbot_autoshoot_delay" "aimbot_hitboxmode" "aimbot_fov" "aimbot_prioritymode" + "aimbot_slow" + "aimbot_slow_intensity" + "aimbot_slow_threshhold" "aimbot_charge" "Ignore" [ "Ignore/Respect Menu" @@ -538,6 +540,10 @@ static const std::string list_tf2 = R"( "log" ] ] +"debug_sl_1" +"debug_sl_2" +"debug_sl_3" +"debug_sl_4" )"; List& MainList() { diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 68107649..76846327 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -25,10 +25,14 @@ float cur_proj_grav { 0.0f }; bool headonly { false }; int last_target { -1 }; bool silent_huntsman { false }; - +/*Broken Autoshoot delay code int iTickAutoshootDelay { 0 }; static CatVar autoshoot_delay(CV_FLOAT, "aimbot_autoshoot_delay", "0", "Autoshoot Delay", "Delays your shot to increase accuracy", 100.0); - +*/ +static CatVar slowaim(CV_SWITCH, "aimbot_slow", "0", "Slow Aim", "Slowly moves your crosshair onto the targets face\nGreat for legit configs\nSilent disables this"); +static CatVar slowaim_intensity(CV_FLOAT, "aimbot_slow_intensity", "0", "Slow Aim Intensity", "How strongly to pull your crosshair you an enemies head.", 100); +static CatVar slowaim_threshhold(CV_FLOAT, "aimbot_slow_threshhold", "0", "Slow Aim Threshhold", "How close to shoot", 100); +//static CatVar slowaim_randomness(CV_FLOAT, "aimbot_slow_random", "0", "meme", "succ", 100); static CatVar ignore_hoovy(CV_SWITCH, "aimbot_ignore_hoovy", "0", "Ignore Hoovies", "Aimbot won't attack hoovies"); int ClosestHitbox(CachedEntity* target) { @@ -293,7 +297,17 @@ int ShouldTarget(CachedEntity* entity) { } return 27; } - +float changey; +float changex; +float sai; +float origx; +float origy; +float angiex; +float angiey; +static CatVar meme1(CV_FLOAT, "debug_sl_1", "0", "origx", "kill", 1000); +static CatVar meme2(CV_FLOAT, "debug_sl_2", "0", "angix", "kill", 1000); +static CatVar meme3(CV_FLOAT, "debug_sl_3", "0", "changex", "kill", 1000); +static CatVar meme4(CV_FLOAT, "debug_sl_4", "0", "sai", "kill", 1000); bool Aim(CachedEntity* entity, CUserCmd* cmd) { //logging::Info("Aiming!"); Vector hit; @@ -317,16 +331,51 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { Vector tr = (hit - g_pLocalPlayer->v_Eye); fVectorAngles(tr, angles); bool smoothed = false; - /*if (this->v_bSmooth->GetBool()) { + if ( (slowaim == 1) && (silent == false) ) { Vector da = (angles - g_pLocalPlayer->v_OrigViewangles); fClampAngle(da); smoothed = true; - if (da.IsZero(v_fSmoothAutoshootTreshold->GetFloat())) smoothed = false; - da *= this->v_fSmoothValue->GetFloat() * (((float)rand() / (float)RAND_MAX) * this->v_fSmoothRandomness->GetFloat()); - angles = g_pLocalPlayer->v_OrigViewangles + da; - }*/ - fClampAngle(angles); - cmd->viewangles = angles; + if (da.IsZero(slowaim_threshhold)) smoothed = false; + sai = slowaim_intensity; + origx = cmd->viewangles.x; + origy = cmd->viewangles.y; + angiex = angles.x; + angiey = angles.y; + + /*if ( origy != angiey ) { + if ( origy > angiey ) { + changey = ( origy + angiey ) / (sai*sai) ; + angles.y = origy + changey; + } else { + changey = ( origy + angiey ) / (sai*sai) ; + angles.y = origy - changey; + } + }*/ + if ( origx != angiex ) { + if ( origx > angiex ) { + changex = ( std::abs(origx - angiex ) ) / (sai) ; + angles.x = origx - changex; + } + if ( origx < angiex ) { + changex = ( std::abs(origx - angiex ) ) / (sai) ; + angles.x = origx + changex; + logging::Info("Adding"); + } + meme1 = origx; + meme2 = angiex; + meme3 = changex; + meme4 = sai; + + } + //logging::Info("ayyming!"); + fClampAngle(angles); + cmd->viewangles.x = angles.x; + //fClampAngle(angles); + //cmd->viewangles = angles; + } else { + fClampAngle(angles); + cmd->viewangles = angles; + } if (silent) { g_pLocalPlayer->bUseSilentAngles = true; } @@ -346,7 +395,8 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { break; } } - bool autoshoot_delay_bool = false; + //Broken Autoshoot Delay code + /*bool autoshoot_delay_bool = false; if ( autoshoot_delay == 0 ) { bool autoshoot_delay_bool = false; } else { @@ -357,18 +407,39 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { iTickAutoshootDelay = 0; } if ( attack && autoshoot_delay_bool ) { - if ( (iTickAutoshootDelay++ / 200 ) >= autoshootdelayvar ) { - cmd->buttons |= IN_ATTACK; - } + UpdateAutoShootTimer(); } else { if ( attack ) { cmd->buttons |= IN_ATTACK; } + }*/ + if ( attack ) { + cmd->buttons |= IN_ATTACK; } + } return true; } +/*Broken Autoshoot delay code +//Ripped from AAAA timer +float autoshoot_timer_start = 0.0f; +float autoshoot_timer = 0.0f; + +void UpdateAutoShootTimer() { + const float& curtime = g_GlobalVars->curtime; + if (autoshoot_timer_start > curtime) autoshoot_timer_start = 0.0f; + if (!autoshoot_timer || !autoshoot_timer_start) { + autoshoot_timer = autoshoot_delay; + autoshoot_timer_start = curtime; + } else { + if (curtime - autoshoot_timer_start > autoshoot_timer) { + cmd->buttons |= IN_ATTACK; + autoshoot_timer_start = curtime; + autoshoot_timer = autoshoot_delay; + } + } +}*/ bool ShouldAim(CUserCmd* cmd) { if (aimkey && aimkey_mode) { bool key_down = g_IInputSystem->IsButtonDown((ButtonCode_t)(int)aimkey); From 6f4163748f445a2a3358bc2712987fe4ad3c3808 Mon Sep 17 00:00:00 2001 From: Julian Rowe Date: Wed, 26 Apr 2017 13:19:45 -0500 Subject: [PATCH 2/7] Updated smooth aim to make it working --- src/gui/ncc/Menu.cpp | 4 +- src/hacks/Aimbot.cpp | 136 ++++++++++++++++++++++++++++++++++--------- 2 files changed, 109 insertions(+), 31 deletions(-) diff --git a/src/gui/ncc/Menu.cpp b/src/gui/ncc/Menu.cpp index a2ae0eff..0b1f57c5 100644 --- a/src/gui/ncc/Menu.cpp +++ b/src/gui/ncc/Menu.cpp @@ -243,10 +243,9 @@ static const std::string list_tf2 = R"( "aimbot_hitboxmode" "aimbot_fov" "aimbot_prioritymode" + "aimbot_charge" "aimbot_slow" "aimbot_slow_intensity" - "aimbot_slow_threshhold" - "aimbot_charge" "Ignore" [ "Ignore/Respect Menu" "aimbot_respect_vaccinator" @@ -544,6 +543,7 @@ static const std::string list_tf2 = R"( "debug_sl_2" "debug_sl_3" "debug_sl_4" +"debug_sl_5" )"; List& MainList() { diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 76846327..9905207f 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -304,10 +304,14 @@ float origx; float origy; float angiex; float angiey; -static CatVar meme1(CV_FLOAT, "debug_sl_1", "0", "origx", "kill", 1000); -static CatVar meme2(CV_FLOAT, "debug_sl_2", "0", "angix", "kill", 1000); -static CatVar meme3(CV_FLOAT, "debug_sl_3", "0", "changex", "kill", 1000); -static CatVar meme4(CV_FLOAT, "debug_sl_4", "0", "sai", "kill", 1000); +int slowfliptype; +int slowdiry1; + +static CatVar meme1(CV_FLOAT, "debug_sl_1", "0", "origy", "kill", 1000); +static CatVar meme2(CV_FLOAT, "debug_sl_2", "0", "angiy", "kill", 1000); +static CatVar meme3(CV_FLOAT, "debug_sl_3", "0", "changey", "kill", 1000); +static CatVar meme4(CV_FLOAT, "debug_sl_4", "0", "showfliptype", "kill", 1000); +static CatVar meme5(CV_FLOAT, "debug_sl_5", "0", "slowdiry", "kill", 1000); bool Aim(CachedEntity* entity, CUserCmd* cmd) { //logging::Info("Aiming!"); Vector hit; @@ -332,47 +336,121 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { fVectorAngles(tr, angles); bool smoothed = false; if ( (slowaim == 1) && (silent == false) ) { + //Some of cats original code that I dont dare to touch. Vector da = (angles - g_pLocalPlayer->v_OrigViewangles); fClampAngle(da); smoothed = true; if (da.IsZero(slowaim_threshhold)) smoothed = false; + + //Save info to vars that are easy to work with sai = slowaim_intensity; origx = cmd->viewangles.x; origy = cmd->viewangles.y; angiex = angles.x; angiey = angles.y; - /*if ( origy != angiey ) { - if ( origy > angiey ) { - changey = ( origy + angiey ) / (sai*sai) ; - angles.y = origy + changey; - } else { - changey = ( origy + angiey ) / (sai*sai) ; - angles.y = origy - changey; + //Angle clamping for when the aimbot chooses a too high of value + if (angiey > 180) angiey = angiey - 360; + if (angiey < -180) angiey = angiey + 360; + + //Determine whether to move the mouse at all for the yaw + if ( origy != angiey ) { + + //Fliping The main axis to prevent 180s from happening when the bot trys to cross -180y and 180y + slowfliptype = 0; + if ( ((angiey < -90) && (origy > 90)) && (slowfliptype == 0) ) { + slowfliptype = 1; + angiey = angiey + 90; + origy = origy - 90; + meme4 = 1; + logging::Info("Flip 1"); } - }*/ - if ( origx != angiex ) { - if ( origx > angiex ) { - changex = ( std::abs(origx - angiex ) ) / (sai) ; - angles.x = origx - changex; - } - if ( origx < angiex ) { - changex = ( std::abs(origx - angiex ) ) / (sai) ; - angles.x = origx + changex; - logging::Info("Adding"); + if ( ((angiey > 90) && (origy < -90)) && (slowfliptype == 0) ) { + slowfliptype = 2; + angiey = angiey - 90; + origy = origy + 90; + meme4 = 2; + logging::Info("Flip 2"); } - meme1 = origx; - meme2 = angiex; - meme3 = changex; - meme4 = sai; + /* + if ( ((angiey > 90) && (origy > 90)) && (slowfliptype == 0) ) { + slowfliptype = 3; + angiey = angiey - 90; + origy = origy - 90; + logging::Info("Flip 3"); + } + if ( ((angiey < -90) && (origy < -90)) && (slowfliptype == 0) ) { + slowfliptype = 4; + angiey = angiey + 90; + origy = origy + 90; + logging::Info("Flip 4"); + } + */ + //Math to calculate how much to move the mouse + changey = ( std::abs(origy - angiey) ) / (sai) ; + + //Determine the direction to move in before reseting the flipped angles + slowdiry1 = 0; + if ( (origy > angiey) && (slowdiry1 == 0) ) slowdiry1 = 1; + if ( (origy < angiey) && (slowdiry1 == 0) ) slowdiry1 = 2; + meme1 = origy; + meme2 = angiey; + meme3 = changey; + meme4 = slowfliptype; + + //Reset Flipped angles + if (slowfliptype == 1) { + slowfliptype = 0; + angiey = angiey - 90; + origy = origy + 90; + slowdiry1 = 2; + logging::Info("Fix Flip 1"); + } + if (slowfliptype == 2) { + slowfliptype = 0; + angiey = angiey + 90; + origy = origy - 90; + slowdiry1 = 1; + logging::Info("Fix Flip 2"); + } + /* + if (slowfliptype == 3) { + slowfliptype = 0; + angiey = angiey + 90; + origy = origy + 90; + logging::Info("Fix Flip 3"); + } + if (slowfliptype == 4) { + slowfliptype = 0; + angiey = angiey - 90; + origy = origy - 90; + logging::Info("Fix Flip 4"); + }*/ + + //Move in the direction determined before the fliped angles + meme5 = slowdiry1; + if ( slowdiry1 == 1 ) angles.y = origy - changey; + if ( slowdiry1 == 2 ) angles.y = origy + changey; } - //logging::Info("ayyming!"); + + //Angle clamping for when the aimbot chooses a too high of value, fixes for when players are above your player + if ( angiex > 89 ) angiex = angiex - 360; + + //Determine whether to move the mouse at all for the pitch + if ( origx != angiex ) { + changex = ( std::abs(origx - angiex) ) / (sai) ; + //Determine the direction to move in + if ( origx > angiex ) angles.x = origx - changex; + if ( origx < angiex ) angles.x = origx + changex; + } + + //Set the newly determined angles fClampAngle(angles); - cmd->viewangles.x = angles.x; - //fClampAngle(angles); - //cmd->viewangles = angles; + cmd->viewangles = angles; + } else { + //When slow aim is off, use the default angles. fClampAngle(angles); cmd->viewangles = angles; } From 10dd7c51fde74c6f6947efe4f3e4c08269c5d7ea Mon Sep 17 00:00:00 2001 From: Julian Rowe Date: Wed, 26 Apr 2017 14:42:10 -0500 Subject: [PATCH 3/7] Updated Smooth aim, Now fully functional! --- src/hacks/Aimbot.cpp | 55 ++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 40 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 9905207f..0cae3a47 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -360,34 +360,23 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { slowfliptype = 0; if ( ((angiey < -90) && (origy > 90)) && (slowfliptype == 0) ) { slowfliptype = 1; - angiey = angiey + 90; - origy = origy - 90; + angiey = angiey - 90; + origy = origy + 90; meme4 = 1; logging::Info("Flip 1"); } if ( ((angiey > 90) && (origy < -90)) && (slowfliptype == 0) ) { slowfliptype = 2; - angiey = angiey - 90; - origy = origy + 90; + angiey = angiey + 90; + origy = origy - 90; meme4 = 2; logging::Info("Flip 2"); } - /* - if ( ((angiey > 90) && (origy > 90)) && (slowfliptype == 0) ) { - slowfliptype = 3; - angiey = angiey - 90; - origy = origy - 90; - logging::Info("Flip 3"); - } - if ( ((angiey < -90) && (origy < -90)) && (slowfliptype == 0) ) { - slowfliptype = 4; - angiey = angiey + 90; - origy = origy + 90; - logging::Info("Flip 4"); - } - */ + //Math to calculate how much to move the mouse changey = ( std::abs(origy - angiey) ) / (sai) ; + //Use stronger shunting due to the flip + if (slowfliptype != 0) changey = ((( std::abs(origy - angiey) ) / (sai * sai)) / sai) ; //Determine the direction to move in before reseting the flipped angles slowdiry1 = 0; @@ -396,42 +385,28 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { meme1 = origy; meme2 = angiey; meme3 = changey; - meme4 = slowfliptype; //Reset Flipped angles if (slowfliptype == 1) { - slowfliptype = 0; - angiey = angiey - 90; - origy = origy + 90; + angiey = angiey + 90; + origy = origy - 90; slowdiry1 = 2; logging::Info("Fix Flip 1"); } if (slowfliptype == 2) { - slowfliptype = 0; - angiey = angiey + 90; - origy = origy - 90; + angiey = angiey - 90; + origy = origy + 90; slowdiry1 = 1; logging::Info("Fix Flip 2"); } - /* - if (slowfliptype == 3) { - slowfliptype = 0; - angiey = angiey + 90; - origy = origy + 90; - logging::Info("Fix Flip 3"); - } - if (slowfliptype == 4) { - slowfliptype = 0; - angiey = angiey - 90; - origy = origy - 90; - logging::Info("Fix Flip 4"); - }*/ //Move in the direction determined before the fliped angles - meme5 = slowdiry1; if ( slowdiry1 == 1 ) angles.y = origy - changey; if ( slowdiry1 == 2 ) angles.y = origy + changey; - + if ( slowfliptype != 0 ) { + meme5 = angles.y; + } + } //Angle clamping for when the aimbot chooses a too high of value, fixes for when players are above your player From 8381ea0cac0f6b235c556a8782147ce6c118f958 Mon Sep 17 00:00:00 2001 From: Julian Rowe Date: Wed, 26 Apr 2017 15:38:46 -0500 Subject: [PATCH 4/7] Polished Slow aim up and fixed a potential hard freeze. --- src/gui/ncc/Menu.cpp | 7 +-- src/hacks/Aimbot.cpp | 102 ++++++++++++++----------------------------- 2 files changed, 33 insertions(+), 76 deletions(-) diff --git a/src/gui/ncc/Menu.cpp b/src/gui/ncc/Menu.cpp index 0b1f57c5..16fd7ab8 100644 --- a/src/gui/ncc/Menu.cpp +++ b/src/gui/ncc/Menu.cpp @@ -245,7 +245,7 @@ static const std::string list_tf2 = R"( "aimbot_prioritymode" "aimbot_charge" "aimbot_slow" - "aimbot_slow_intensity" + "aimbot_slow_shunt" "Ignore" [ "Ignore/Respect Menu" "aimbot_respect_vaccinator" @@ -539,11 +539,6 @@ static const std::string list_tf2 = R"( "log" ] ] -"debug_sl_1" -"debug_sl_2" -"debug_sl_3" -"debug_sl_4" -"debug_sl_5" )"; List& MainList() { diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 0cae3a47..26d4927d 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -25,14 +25,7 @@ float cur_proj_grav { 0.0f }; bool headonly { false }; int last_target { -1 }; bool silent_huntsman { false }; -/*Broken Autoshoot delay code -int iTickAutoshootDelay { 0 }; -static CatVar autoshoot_delay(CV_FLOAT, "aimbot_autoshoot_delay", "0", "Autoshoot Delay", "Delays your shot to increase accuracy", 100.0); -*/ -static CatVar slowaim(CV_SWITCH, "aimbot_slow", "0", "Slow Aim", "Slowly moves your crosshair onto the targets face\nGreat for legit configs\nSilent disables this"); -static CatVar slowaim_intensity(CV_FLOAT, "aimbot_slow_intensity", "0", "Slow Aim Intensity", "How strongly to pull your crosshair you an enemies head.", 100); -static CatVar slowaim_threshhold(CV_FLOAT, "aimbot_slow_threshhold", "0", "Slow Aim Threshhold", "How close to shoot", 100); -//static CatVar slowaim_randomness(CV_FLOAT, "aimbot_slow_random", "0", "meme", "succ", 100); + static CatVar ignore_hoovy(CV_SWITCH, "aimbot_ignore_hoovy", "0", "Ignore Hoovies", "Aimbot won't attack hoovies"); int ClosestHitbox(CachedEntity* target) { @@ -297,6 +290,10 @@ int ShouldTarget(CachedEntity* entity) { } return 27; } + +//Initialize vars for slow aim +static CatVar slowaim(CV_SWITCH, "aimbot_slow", "0", "Slow Aim", "Slowly moves your crosshair onto the targets face\nUse with triggerbot.\nSilent breaks this"); +static CatVar slowaim_shunting(CV_FLOAT, "aimbot_slow_shunt", "0", "Slow Aim Shunt", "How strongly to shunt the aiming.", 100); float changey; float changex; float sai; @@ -305,13 +302,8 @@ float origy; float angiex; float angiey; int slowfliptype; -int slowdiry1; +int slowdir; -static CatVar meme1(CV_FLOAT, "debug_sl_1", "0", "origy", "kill", 1000); -static CatVar meme2(CV_FLOAT, "debug_sl_2", "0", "angiy", "kill", 1000); -static CatVar meme3(CV_FLOAT, "debug_sl_3", "0", "changey", "kill", 1000); -static CatVar meme4(CV_FLOAT, "debug_sl_4", "0", "showfliptype", "kill", 1000); -static CatVar meme5(CV_FLOAT, "debug_sl_5", "0", "slowdiry", "kill", 1000); bool Aim(CachedEntity* entity, CUserCmd* cmd) { //logging::Info("Aiming!"); Vector hit; @@ -334,16 +326,13 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { //logging::Info("ayyming!"); Vector tr = (hit - g_pLocalPlayer->v_Eye); fVectorAngles(tr, angles); - bool smoothed = false; - if ( (slowaim == 1) && (silent == false) ) { + + //Needed for logic to determine whether to use slow aim. Without this, sai set to 0 will loop and freeze system + sai = slowaim_shunting; + if ( (slowaim == 1) && (silent == false) && (sai > 0) ) { //Some of cats original code that I dont dare to touch. Vector da = (angles - g_pLocalPlayer->v_OrigViewangles); - fClampAngle(da); - smoothed = true; - if (da.IsZero(slowaim_threshhold)) smoothed = false; - //Save info to vars that are easy to work with - sai = slowaim_intensity; origx = cmd->viewangles.x; origy = cmd->viewangles.y; angiex = angles.x; @@ -354,70 +343,57 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { if (angiey < -180) angiey = angiey + 360; //Determine whether to move the mouse at all for the yaw - if ( origy != angiey ) { + if (origy != angiey) { - //Fliping The main axis to prevent 180s from happening when the bot trys to cross -180y and 180y + //Fliping The main axis to prevent 360s from happening when the bot trys to cross -180y and 180y slowfliptype = 0; - if ( ((angiey < -90) && (origy > 90)) && (slowfliptype == 0) ) { + if ( ((angiey < -90) && (origy > 90)) && (slowfliptype == 0) ) { slowfliptype = 1; angiey = angiey - 90; origy = origy + 90; - meme4 = 1; - logging::Info("Flip 1"); } if ( ((angiey > 90) && (origy < -90)) && (slowfliptype == 0) ) { slowfliptype = 2; angiey = angiey + 90; origy = origy - 90; - meme4 = 2; - logging::Info("Flip 2"); } //Math to calculate how much to move the mouse - changey = ( std::abs(origy - angiey) ) / (sai) ; + changey = (std::abs(origy - angiey)) / (sai) ; //Use stronger shunting due to the flip if (slowfliptype != 0) changey = ((( std::abs(origy - angiey) ) / (sai * sai)) / sai) ; //Determine the direction to move in before reseting the flipped angles - slowdiry1 = 0; - if ( (origy > angiey) && (slowdiry1 == 0) ) slowdiry1 = 1; - if ( (origy < angiey) && (slowdiry1 == 0) ) slowdiry1 = 2; - meme1 = origy; - meme2 = angiey; - meme3 = changey; + slowdir = 0; + if ((origy > angiey) && (slowdir == 0)) slowdir = 1; + if ((origy < angiey) && (slowdir == 0)) slowdir = 2; - //Reset Flipped angles + //Reset Flipped angles and fix directions if (slowfliptype == 1) { angiey = angiey + 90; origy = origy - 90; - slowdiry1 = 2; - logging::Info("Fix Flip 1"); + slowdir = 2; } if (slowfliptype == 2) { angiey = angiey - 90; origy = origy + 90; - slowdiry1 = 1; - logging::Info("Fix Flip 2"); + slowdir = 1; } //Move in the direction determined before the fliped angles - if ( slowdiry1 == 1 ) angles.y = origy - changey; - if ( slowdiry1 == 2 ) angles.y = origy + changey; - if ( slowfliptype != 0 ) { - meme5 = angles.y; - } - + if (slowdir == 1) angles.y = origy - changey; + if (slowdir == 2) angles.y = origy + changey; } //Angle clamping for when the aimbot chooses a too high of value, fixes for when players are above your player - if ( angiex > 89 ) angiex = angiex - 360; + if (angiex > 89) angiex = angiex - 360; //Determine whether to move the mouse at all for the pitch - if ( origx != angiex ) { - changex = ( std::abs(origx - angiex) ) / (sai) ; + if (origx != angiex) { + changex = (std::abs(origx - angiex)) / (sai) ; //Determine the direction to move in - if ( origx > angiex ) angles.x = origx - changex; - if ( origx < angiex ) angles.x = origx + changex; + if (origx > angiex) angles.x = origx - changex; + if (origx < angiex) angles.x = origx + changex; } //Set the newly determined angles @@ -442,30 +418,14 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { static int forbiddenWeapons[] = { g_pClassID->CTFCompoundBow, g_pClassID->CTFKnife }; int weapon_class = g_pLocalPlayer->weapon()->m_iClassID; bool attack = true; - for (int i = 0; i < 2; i++) { + for (int i = 0; i < 2; i++) { if (weapon_class == forbiddenWeapons[i]) { attack = false; break; } } - //Broken Autoshoot Delay code - /*bool autoshoot_delay_bool = false; - if ( autoshoot_delay == 0 ) { - bool autoshoot_delay_bool = false; - } else { - bool autoshoot_delay_bool = true; - } - int autoshootdelayvar = autoshoot_delay; - if ( attack == false ) { - iTickAutoshootDelay = 0; - } - if ( attack && autoshoot_delay_bool ) { - UpdateAutoShootTimer(); - } else { - if ( attack ) { - cmd->buttons |= IN_ATTACK; - } - }*/ + //Autoshoot breaks Slow aimbot + if (slowaim == true) attack = false; if ( attack ) { cmd->buttons |= IN_ATTACK; } @@ -506,6 +466,8 @@ bool ShouldAim(CUserCmd* cmd) { case AimKeyMode_t::PRESS_TO_TOGGLE: aimkey_switch = !aimkey_switch; if (!aimkey_switch) return false; + //Dont autoshoot with slow aim on. + if (slowaim) return false; } } if (only_can_shoot) { From 5b0fb4e9a3b2ae44bcab7d7d3d22a78153f56886 Mon Sep 17 00:00:00 2001 From: julianacan9999 Date: Wed, 26 Apr 2017 15:45:40 -0500 Subject: [PATCH 5/7] Fixed github being a meanie >.> --- src/hacks/Aimbot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 26d4927d..61825613 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -615,4 +615,4 @@ CatVar proj_visibility(CV_SWITCH, "aimbot_proj_vispred", "0", "Projectile visibi CatVar proj_fov(CV_SWITCH, "aimbot_proj_fovpred", "0", "Projectile FOV mode", "If disabled, FOV restrictions apply to current target position"); }}} - + From 489c75b3c23696679ac59941907b685d0c9561ae Mon Sep 17 00:00:00 2001 From: julianacan9999 Date: Wed, 26 Apr 2017 15:48:48 -0500 Subject: [PATCH 6/7] Fixed Github not commiting my changes... Again Y U DU DIS!!! --- src/hacks/Aimbot.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 61825613..26963e17 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -330,8 +330,6 @@ bool Aim(CachedEntity* entity, CUserCmd* cmd) { //Needed for logic to determine whether to use slow aim. Without this, sai set to 0 will loop and freeze system sai = slowaim_shunting; if ( (slowaim == 1) && (silent == false) && (sai > 0) ) { - //Some of cats original code that I dont dare to touch. - Vector da = (angles - g_pLocalPlayer->v_OrigViewangles); //Save info to vars that are easy to work with origx = cmd->viewangles.x; origy = cmd->viewangles.y; From d0f9ebd6b0586bf783767717da8f9e735ef5dedc Mon Sep 17 00:00:00 2001 From: julianacan9999 Date: Wed, 26 Apr 2017 18:38:23 -0500 Subject: [PATCH 7/7] Moved menu option Moved a menu option for smooth aim shunting into preferences --- src/gui/ncc/Menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/ncc/Menu.cpp b/src/gui/ncc/Menu.cpp index 16fd7ab8..25d09197 100644 --- a/src/gui/ncc/Menu.cpp +++ b/src/gui/ncc/Menu.cpp @@ -245,7 +245,6 @@ static const std::string list_tf2 = R"( "aimbot_prioritymode" "aimbot_charge" "aimbot_slow" - "aimbot_slow_shunt" "Ignore" [ "Ignore/Respect Menu" "aimbot_respect_vaccinator" @@ -270,6 +269,7 @@ static const std::string list_tf2 = R"( "aimbot_zoomed" "aimbot_only_when_can_shoot" "aimbot_enable_attack_only" + "aimbot_slow_shunt" "aimbot_maxrange" "aimbot_interp" "Projectile Aimbot" [