summaryrefslogtreecommitdiff
path: root/internal_rewrite/ragebot.cpp
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2018-10-06 12:09:36 +0200
committernavewindre <boneyaard@gmail.com>2018-10-06 12:09:36 +0200
commit3e0d8199fec5b6979dc280533de69dded4260a0f (patch)
treed34767fd1041642024a41254c3488fb8e082b076 /internal_rewrite/ragebot.cpp
parent66dcb4cdcdb0d3efce0ba74c0c5ad79bc7c51111 (diff)
z\cxdtgs
Diffstat (limited to 'internal_rewrite/ragebot.cpp')
-rw-r--r--internal_rewrite/ragebot.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/internal_rewrite/ragebot.cpp b/internal_rewrite/ragebot.cpp
index 71f5980..452dc9b 100644
--- a/internal_rewrite/ragebot.cpp
+++ b/internal_rewrite/ragebot.cpp
@@ -822,14 +822,19 @@ namespace features
m_antiaim->run_fakewalk( );
}
+ if( g_settings.rage.active->m_auto_stop( ) == 5 ) {
+ m_cmd->m_buttons |= IN_DUCK;
+ }
if( hitchance && !util::hitchance( it, aim_ang,
g_settings.rage.active->m_hitchance, hitbox ) ) {
if( g_settings.rage.active->m_auto_stop( ) == 1 || g_settings.rage.active->m_auto_stop( ) == 4 )
quick_stop( m_cmd );
- if( g_settings.rage.active->m_auto_stop( ) == 5 )
- m_cmd->m_buttons |= IN_DUCK;
+ if( g_settings.rage.active->m_auto_stop( ) == 5 ) {
+ if( g_ctx.m_local->m_flDuckAmount( ) < 1.f )
+ quick_stop( m_cmd );
+ }
if( g_settings.rage.active->m_auto_stop( ) == 4 && g_cheat.m_lagmgr.get_choked( ) < 10 && !m_antiaim->is_fakewalking( ) )
g_cheat.m_lagmgr.set_state( false );
@@ -1088,18 +1093,18 @@ namespace features
aim_target_t t{ };
bool is_zeus = wep->m_iItemDefinitionIndex( ) == WEAPON_TASER;
- if( m_target != -1 && !m_antiaim->is_fakewalking( ) )
- if( ( g_settings.rage.active->m_auto_stop == 2 || g_settings.rage.active->m_auto_stop == 5 ) && can_hit_target( m_target, &t, is_zeus, false ) ) {
- quick_stop( m_cmd );
- if( g_settings.rage.active->m_auto_stop == 5 )
- m_cmd->m_buttons |= IN_DUCK;
- }
- else if( g_settings.rage.active->m_auto_stop == 3 && can_hit_target( m_target, &t, is_zeus, false ) ) {
+ if( m_target != -1 && !m_antiaim->is_fakewalking( ) ) {
+ bool can_hit = can_hit_target( m_target, &t, is_zeus, false );
+
+ if( !can_hit )
+ m_target = -1;
+
+ else if( g_settings.rage.active->m_auto_stop == 3 && can_hit ) {
m_antiaim->run_fakewalk( );
//if( !g_cheat.m_lagmgr.get_choked( ) || g_cheat.m_lagmgr.get_state( ) )
- m_cmd->m_viewangles.y = m_antiaim->get_yaw( );
+ m_cmd->m_viewangles.y = m_antiaim->get_yaw( );
}
-
+ }
return;
}