diff options
Diffstat (limited to 'internal_rewrite/lag_mgr.cpp')
| -rw-r--r-- | internal_rewrite/lag_mgr.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/internal_rewrite/lag_mgr.cpp b/internal_rewrite/lag_mgr.cpp index 66ccd52..9189345 100644 --- a/internal_rewrite/lag_mgr.cpp +++ b/internal_rewrite/lag_mgr.cpp @@ -63,11 +63,12 @@ namespace features auto weapon = g_ctx.m_local->get_weapon( ); - if( g_ctx.m_local->m_vecVelocity( ).length( ) < 0.1f || - g_cheat.m_ragebot.m_antiaim->is_fakewalking( ) ) { + if( g_cheat.m_ragebot.m_antiaim->is_fakewalking( ) ) { return; } + bool moving = g_ctx.m_local->m_vecVelocity( ).length2d( ) > 0.f; + vec3_t delta = g_ctx.m_last_origin - g_ctx.m_local->m_vecOrigin( ); int max_ticks = g_settings.rage.fakelag.ticks( ); if( settings.fluctuate ) @@ -103,11 +104,11 @@ namespace features bool send = true; static bool was_onground{ }; - if( settings.in_move && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) && g_ctx.m_local->m_vecVelocity( ).length2d( ) > 0.1f ) { + if( settings.in_move && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) && moving ) { send = false; } - if( settings.on_peek ) { + if( settings.on_peek && moving ) { static int choke_ticks = 0; bool peeking = predict_position( 20.f + g_ctx.m_local->m_vecVelocity( ) * TICK_INTERVAL( ) * 2.f ); @@ -155,6 +156,23 @@ namespace features was_onground = ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ); + if( settings.on_duck && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) ) { + float amt = g_ctx.m_local->m_flDuckAmount( ); + if( m_cmd->m_buttons & IN_DUCK ) { + if( amt < 1.0f ) + send = false; + } else if( amt > 0.f ) + send = false; + } + + static int wep_choke = 0; + if( m_cmd->m_weaponselect && settings.on_select ) { + wep_choke = max_ticks; + } + + if( wep_choke ) + send = !--wep_choke; + if( ( m_cmd->m_buttons & IN_ATTACK ) && g_ctx.m_local->can_attack( ) && !settings.in_attack ) { if( !weapon->is_grenade( ) || ( weapon->is_grenade( ) && weapon->m_fThrowTime( ) < TICK_INTERVAL( ) ) ) { |
