summaryrefslogtreecommitdiff
path: root/internal_rewrite/ragebot_antiaim.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_antiaim.cpp
parent66dcb4cdcdb0d3efce0ba74c0c5ad79bc7c51111 (diff)
z\cxdtgs
Diffstat (limited to 'internal_rewrite/ragebot_antiaim.cpp')
-rw-r--r--internal_rewrite/ragebot_antiaim.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/internal_rewrite/ragebot_antiaim.cpp b/internal_rewrite/ragebot_antiaim.cpp
index a3fa292..c73ad54 100644
--- a/internal_rewrite/ragebot_antiaim.cpp
+++ b/internal_rewrite/ragebot_antiaim.cpp
@@ -134,14 +134,17 @@ namespace features
if( g_ctx.m_local->get_animstate( )->m_velocity < 0.1f )
g_ctx.m_local->get_animstate( )->m_velocity = 0.f;
- bool moving = g_ctx.m_local->get_animstate( )->m_velocity > 0.1f && g_ctx.m_local->get_animstate( )->m_bOnGround;
- float time = g_ctx.pred_time( );
+ bool moving = g_ctx.m_local->get_animstate( )->m_velocity > 0.1f;
+ bool onground = g_ctx.m_local->get_animstate( )->m_bOnGround;
- if( moving ) {
- m_next_update = time + 0.22f;
- }
- else if( time > m_next_update ) {
- m_next_update = time + 1.1f;
+ float time = g_ctx.pred_time( );
+
+ if( onground ) {
+ if( moving ) {
+ m_next_update = time + 0.22f;
+ } else if( time > m_next_update ) {
+ m_next_update = time + 1.1f;
+ }
}
if( g_ctx.m_tickbase > 0 ) {
@@ -186,7 +189,7 @@ namespace features
return;
//yep
- if( !( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) )
+ if( !g_ctx.m_local->get_animstate( )->m_bOnGround )
return;
bool breaking = g_ctx.m_local->get_animstate( )->m_velocity < 0.1f;
@@ -519,7 +522,10 @@ namespace features
m_direction = direction;
aim_angle.y += direction ? -90.f : 90.f;
- aim_angle.y = math::find_closest_step( aim_angle.y, 30.f );
+
+ if( g_settings.rage.angle_step ) {
+ aim_angle.y = math::find_closest_step( aim_angle.y, g_settings.rage.angle_step_degrees );
+ }
if( g_settings.rage.pitch == 3 && g_settings.rage.break_lby_edge && m_breaker.get_next_update( ) < 2 && g_ctx.m_local->get_animstate( )->m_velocity < 0.1f ) {
vec3_t eye_pos = g_ctx.m_local->get_eye_pos( );
@@ -591,7 +597,7 @@ namespace features
vec3_t vel = g_ctx.m_local->m_vecVelocity( );
float speed = vel.length2d( );
- if( speed < 1.f ) {
+ if( speed < 0.1f ) {
g_ctx.get_last_cmd( )->m_forwardmove = 0.f;
g_ctx.get_last_cmd( )->m_sidemove = 0.f;
return;
@@ -649,7 +655,7 @@ namespace features
g_cheat.m_lagmgr.set_state( false );
}
- if( ticks_to_stop > ticks_left - 1 || !choked ) {
+ if( ticks_left <= ticks_to_stop || !choked ) {
quick_stop( );
}
}
@@ -662,8 +668,6 @@ namespace features
return g_cheat.m_lagmgr.get_state( ) ? 75.f : 89.f;
case 3:
return 89.f;
- // These won't work the way you want them to, better to make a slider
- // for the amount of revolutions or something, idk.
case 4:
return 1080.f + g_settings.rage.pitch_offset( );
case 5: