diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-28 19:59:15 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-28 19:59:15 +0200 |
| commit | 66dcb4cdcdb0d3efce0ba74c0c5ad79bc7c51111 (patch) | |
| tree | 2d2e1d67fc4f997688bd1560c94bf863a661eda4 /internal_rewrite/ragebot.cpp | |
| parent | 85434a853957ae5315594f72561dd1a745549727 (diff) | |
a
Diffstat (limited to 'internal_rewrite/ragebot.cpp')
| -rw-r--r-- | internal_rewrite/ragebot.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/internal_rewrite/ragebot.cpp b/internal_rewrite/ragebot.cpp index 6aefbd1..71f5980 100644 --- a/internal_rewrite/ragebot.cpp +++ b/internal_rewrite/ragebot.cpp @@ -679,7 +679,7 @@ namespace features return -1;
}
- bool c_ragebot::can_hit_target( int it, aim_target_t* ret, bool zeus ) {
+ bool c_ragebot::can_hit_target( int it, aim_target_t* ret, bool zeus, bool hitchance ) {
vec3_t aim_ang;
vec3_t aim_pos;
vec3_t local_pos = g_ctx.m_local->get_eye_pos( );
@@ -823,11 +823,14 @@ namespace features }
- if( !util::hitchance( it, aim_ang,
- g_settings.rage.active->m_hitchance, hitbox ) ) {
+ 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( ) == 4 && g_cheat.m_lagmgr.get_choked( ) < 10 && !m_antiaim->is_fakewalking( ) )
g_cheat.m_lagmgr.set_state( false );
@@ -1086,10 +1089,12 @@ namespace features 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 && can_hit_target( m_target, &t, is_zeus ) ) {
+ 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 ) ) {
+ else if( g_settings.rage.active->m_auto_stop == 3 && can_hit_target( m_target, &t, is_zeus, false ) ) {
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( );
|
