diff options
| author | navewindre <boneyaard@gmail.com> | 2018-12-24 23:46:20 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-12-24 23:46:20 +0100 |
| commit | 8be3f19c8ace79135a593ac697751579fa1a0998 (patch) | |
| tree | b3d46e9ce783582a60607c6bc1d3ed8a2f854d18 /cheat/internal_rewrite/ragebot_antiaim.cpp | |
| parent | cac146640ad99309329119ceb264542de12bc9aa (diff) | |
dsafdsadsadsad
Diffstat (limited to 'cheat/internal_rewrite/ragebot_antiaim.cpp')
| -rw-r--r-- | cheat/internal_rewrite/ragebot_antiaim.cpp | 50 |
1 files changed, 8 insertions, 42 deletions
diff --git a/cheat/internal_rewrite/ragebot_antiaim.cpp b/cheat/internal_rewrite/ragebot_antiaim.cpp index 4e7f185..fa85598 100644 --- a/cheat/internal_rewrite/ragebot_antiaim.cpp +++ b/cheat/internal_rewrite/ragebot_antiaim.cpp @@ -608,22 +608,6 @@ namespace features m_is_fakewalking = true;
- auto velocity = g_ctx.m_local->m_vecVelocity( );
-
- static auto predict_velocity = [ ]( vec3_t* velocity ) {
- static auto sv_friction = g_csgo.m_cvar( )->FindVar( xors( "sv_friction" ) );
- static auto sv_stopspeed = g_csgo.m_cvar( )->FindVar( xors( "sv_stopspeed" ) );
-
- float speed = velocity->length( );
- if( speed >= 0.1f ) {
- //if it works, it works
- float friction = sv_friction->get_float( ) * 1.12f;
- float stop_speed = std::max< float >( speed, sv_stopspeed->get_float( ) );
- float time = std::max< float >( g_csgo.m_globals->m_interval_per_tick, g_csgo.m_globals->m_frametime );
- *velocity *= std::max< float >( 0.f, speed - friction * stop_speed * time / speed );
- }
- };
-
static auto quick_stop = [ & ]( ) {
vec3_t vel = g_ctx.m_local->m_vecVelocity( );
float speed = vel.length2d( );
@@ -666,27 +650,9 @@ namespace features g_ctx.get_last_cmd( )->m_sidemove = ndir.y * wishspeed;
};
- int ticks_to_stop;
- for( ticks_to_stop = 0; ticks_to_stop < 15; ++ticks_to_stop ) {
- if( velocity.length2d( ) < 0.1f )
- break;
-
- predict_velocity( &velocity );
- }
-
- int update_ticks = m_breaker.get_next_update( ) - 1;
-
- const int max_ticks = math::min< int >( g_settings.rage.fakewalk_ticks, update_ticks );
- const int choked = g_cheat.m_lagmgr.get_choked( );
- int ticks_left = max_ticks - choked;
-
- if( choked < max_ticks || ticks_to_stop ) {
- g_cheat.m_lagmgr.set_state( false );
- }
-
- if( ticks_left <= ticks_to_stop || !choked ) {
+ float delta = desync_delta( );
+ if( delta < 50.f )
quick_stop( );
- }
}
float c_ragebot::c_antiaim::get_pitch( ) {
@@ -717,11 +683,12 @@ namespace features static int ticks = 0;
static bool side_switch = false;
bool on_ground = false;
+ on_ground = g_ctx.m_local->m_fFlags( ) & FL_ONGROUND;
int setting = fake ? g_settings.rage.fake_yaw : g_settings.rage.real_yaw;
int jitter = fake ? g_settings.rage.fake_yaw_jitter : g_settings.rage.real_yaw_jitter;
int add = fake ? g_settings.rage.fake_yaw_add : g_settings.rage.real_yaw_add;
- if( !g_ctx.m_local->get_animstate( )->m_bOnGround ) {
+ if( !on_ground ) {
if( !fake && g_settings.rage.air_yaw( ) ) {
setting = g_settings.rage.air_yaw;
jitter = g_settings.rage.air_yaw_jitter;
@@ -736,9 +703,7 @@ namespace features }
}
- on_ground = g_ctx.m_local->get_animstate( )->m_bOnGround;
-
- if( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) {
+ if( on_ground ) {
last_onground = g_ctx.pred_time( );
}
@@ -814,7 +779,7 @@ namespace features if( is_fake && g_ctx.m_local->m_fFlags( ) & FL_ONGROUND )
return g_ctx.m_last_realangle.y - desync_delta( );
- return get_yaw( is_fake, original, no_jitter );
+ return get_yaw( false, original, no_jitter );
}
void c_ragebot::c_antiaim::run( ) {
@@ -895,7 +860,8 @@ namespace features freestanding = run_freestanding( );
}
- if( m_breaker.get_next_update( ) < 0 && !g_cheat.m_lagmgr.get_state( ) )
+ if( m_breaker.get_next_update( ) < 0 && !g_cheat.m_lagmgr.get_state( )
+ && g_settings.rage.fake_yaw && g_ctx.m_local->m_fFlags( ) & FL_ONGROUND )
m_cmd->m_viewangles.y = g_ctx.m_last_realangle.y + 115.f;
m_is_edging = freestanding || edge_detected;
|
