From 8be3f19c8ace79135a593ac697751579fa1a0998 Mon Sep 17 00:00:00 2001 From: navewindre Date: Mon, 24 Dec 2018 23:46:20 +0100 Subject: dsafdsadsadsad --- cheat/internal_rewrite/ragebot.hpp | 3 +- cheat/internal_rewrite/ragebot_antiaim.cpp | 50 ++++------------------ cheat/internal_rewrite/ui.h | 20 ++------- cheat/internal_rewrite/ui_dropdown_item.h | 5 +++ .../update_clientside_animation.cpp | 16 ++++--- cheat/internal_rewrite/visual_local.cpp | 38 +++++----------- 6 files changed, 39 insertions(+), 93 deletions(-) (limited to 'cheat/internal_rewrite') diff --git a/cheat/internal_rewrite/ragebot.hpp b/cheat/internal_rewrite/ragebot.hpp index c9eb4f2..700402f 100644 --- a/cheat/internal_rewrite/ragebot.hpp +++ b/cheat/internal_rewrite/ragebot.hpp @@ -118,9 +118,8 @@ namespace features bool run_freestanding( int player = -1 ); bool run_edge_dtc( ); - float desync_delta( ); - public: + float desync_delta( ); bool is_fakewalking( ) const { return m_is_fakewalking; } void run_fakewalk( ); 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; diff --git a/cheat/internal_rewrite/ui.h b/cheat/internal_rewrite/ui.h index 073a980..50ca921 100644 --- a/cheat/internal_rewrite/ui.h +++ b/cheat/internal_rewrite/ui.h @@ -417,11 +417,9 @@ namespace ui [ ]( ) { return !!g_settings.rage.air_yaw( ) && !!g_settings.rage.real_yaw( ); } ); - yaw_form->add_item( std::make_shared< ui::c_dropdown< > >( 0, 0, 140, xors( "fake yaw" ), &g_settings.rage.fake_yaw, &dropdowns::antiaim_yaw ) ); + yaw_form->add_item( std::make_shared< ui::c_dropdown< > >( 0, 0, 140, xors( "fake yaw" ), &g_settings.rage.fake_yaw, &dropdowns::antiaim_fake ) ); yaw_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, -180, 180, &g_settings.rage.fake_yaw_add( ) ) )->set_cond( [ ]( ) { return !!g_settings.rage.fake_yaw( ); } ); - yaw_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 0, 90, xors( "fake yaw jitter" ), &g_settings.rage.fake_yaw_jitter ) )->set_cond( - [ ]( ) { return !!g_settings.rage.fake_yaw( ); } ); } auto edge_form = std::make_shared< ui::c_form >( 0, 0, 215, 110, xors( "edge detection" ), 110 ); { @@ -444,29 +442,17 @@ namespace ui &g_settings.rage.edge_dtc_priority, &dropdowns::edge_priority ) )->set_cond( [ ]( ) { return g_settings.rage.edge_dtc_normal( ) && g_settings.rage.edge_detection( ); } ); - edge_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "break lby when edging" ), &g_settings.rage.break_lby_edge( ) ) - )->set_cond( [ ]( ) { return g_settings.rage.break_lby; } ); edge_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 0, 90, xors( "fake jitter" ), &g_settings.rage.edge_dtc_jitter ) ); } - auto lby_form = std::make_shared< ui::c_form >( 0, 0, 215, 106, xors( "lby breaker" ), 106 ); { - lby_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "break lby" ), &g_settings.rage.break_lby ) ); - lby_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, -120, 120, &g_settings.rage.lby_delta ) )->set_cond( - [ ]( ) { return g_settings.rage.break_lby( ); } ); - - lby_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "avoid updates" ), &g_settings.rage.lby_avoid_updates ) ); - + auto lby_form = std::make_shared< ui::c_form >( 0, 0, 215, 33, xors( "other" ), 33 ); { lby_form->add_item( std::make_shared< ui::c_checkbox >( 0, 0, xors( "fakewalk" ), &g_settings.rage.fakewalk ) )->add_item( std::make_shared< ui::c_key_picker_small >( 195, 0, &g_settings.rage.fakewalk_key ) ); - - lby_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 7, 16 - , &g_settings.rage.fakewalk_ticks ) )->set_cond( - [ ]( ) { return g_settings.rage.fakewalk; } ); } - auto fakelag_form = std::make_shared< ui::c_form >( 0, 0, 215, 165, xors( "fakelag" ), 165 ); { + auto fakelag_form = std::make_shared< ui::c_form >( 0, 0, 215, 238, xors( "fakelag" ), 238 ); { fakelag_form->add_item( std::make_shared< ui::c_dropdown< > >( 0, 0, 140, xors( "mode" ), &g_settings.rage.fakelag.mode, &dropdowns::fakelag_types ) ); fakelag_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 2, 16, &g_settings.rage.fakelag.ticks ) ); fakelag_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 0, 50, xors( "variance" ), &g_settings.rage.fakelag.fluctuate ) ); diff --git a/cheat/internal_rewrite/ui_dropdown_item.h b/cheat/internal_rewrite/ui_dropdown_item.h index 6789b3c..213194e 100644 --- a/cheat/internal_rewrite/ui_dropdown_item.h +++ b/cheat/internal_rewrite/ui_dropdown_item.h @@ -43,6 +43,11 @@ namespace ui { xors( "random" ), 5 }, }; + static std::vector< dropdown_item_t< > > antiaim_fake = { + { xors( "normal" ), 0 }, + { xors( "desync" ), 1 }, + }; + static std::vector< dropdown_item_t< > > delay_type = { { xors( "none" ), 0 }, { xors( "time" ), 2 }, diff --git a/cheat/internal_rewrite/update_clientside_animation.cpp b/cheat/internal_rewrite/update_clientside_animation.cpp index 243d760..9071e6b 100644 --- a/cheat/internal_rewrite/update_clientside_animation.cpp +++ b/cheat/internal_rewrite/update_clientside_animation.cpp @@ -28,17 +28,23 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { last_update = g_csgo.m_globals->m_curtime; - ent->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount = g_csgo.m_globals->m_framecount; + //ent->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount = g_csgo.m_globals->m_framecount; - float backup_time = ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime; + //float backup_time = ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime; - ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = g_csgo.m_globals->m_curtime; + //this doesn't work anymore + //ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = g_csgo.m_globals->m_curtime; + + ent->get_animstate( )->pBaseEntity = nullptr; + old_func( ecx_, edx_ ); - ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = backup_time; + + ent->get_animstate( )->pBaseEntity = ent; + //ent->get_animstate( )->m_flLastClientSideAnimationUpdateTime = backup_time; if( !first_update ) { - g_ctx.m_local->restore_anim_data( true ); + //g_ctx.m_local->restore_anim_data( true ); ent->set_abs_angles( vec3_t( 0, g_ctx.m_absyaw, 0 ) ); //ent->get_animstate( )->m_bOnGround = false; diff --git a/cheat/internal_rewrite/visual_local.cpp b/cheat/internal_rewrite/visual_local.cpp index 9457950..b9521a8 100644 --- a/cheat/internal_rewrite/visual_local.cpp +++ b/cheat/internal_rewrite/visual_local.cpp @@ -150,39 +150,23 @@ namespace features } if( g_settings.rage.anti_aim( ) ) { - static float last_lby = 0.f; - static float last_update = 0.f; - float lby = g_ctx.m_local->m_flLowerBodyYawTarget( ); - if( lby != last_lby ) { - last_update = g_csgo.m_globals->m_curtime; - last_lby = lby; - } - - float lby_delta = std::abs( std::remainderf( lby - g_ctx.m_thirdperson_angle.y, 360.f ) ); - float time_delta = g_csgo.m_globals->m_curtime - last_update; - - bool breaking = lby_delta > 35.f && time_delta > 0.2f; - if( g_cheat.m_ragebot.m_antiaim->is_edging( ) ) { draw_really_big_string( 9, ( cur_pos += offset ), clr_t( 110, 110, 110, 255 ), xors( "EDGE" ) ); draw_really_big_string( 11, cur_pos + 2, clr_t( 0, 0, 0, 255 ), xors( "EDGE" ) ); draw_really_big_string( 10, cur_pos, esp_green( ), xors( "EDGE" ) ); } - if( g_settings.rage.break_lby( ) ) { - draw_really_big_string( 9, ( cur_pos += offset ), clr_t( 110, 110, 110, 255 ), xors( "LBY" ) ); - draw_really_big_string( 11, cur_pos + 2, clr_t( 0, 0, 0, 255 ), xors( "LBY" ) ); - draw_really_big_string( 10, cur_pos, breaking ? esp_green( ) : esp_red( ), xors( "LBY" ) ); - - auto animstate = g_ctx.m_local->get_animstate( ); - if( animstate && animstate->m_velocity < 0.1f && animstate->m_bOnGround ) { - draw_filled_rect( 11, ( cur_pos += 4 ) + 18, 36, 3, clr_t( 0, 0, 0, 170 ) ); - - float progress = ( float )g_cheat.m_ragebot.m_antiaim->get_next_update( ) / TIME_TO_TICKS( 1.1f ); - - if( progress <= 1.f ) - draw_filled_rect( 11, cur_pos + 19, 34 * progress, 1, esp_green( ) ); - } + if( g_settings.rage.fake_yaw && g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) { + float max = 57.5f; + float delta = g_cheat.m_ragebot.m_antiaim->desync_delta( ); + + float percent = delta / max; + + auto clr = clr_t::blend( esp_red( ), esp_green( ), percent ); + + draw_really_big_string( 9, ( cur_pos += offset ), clr_t( 110, 110, 110, 255 ), xors( "FAKE" ) ); + draw_really_big_string( 11, cur_pos + 2, clr_t( 0, 0, 0, 255 ), xors( "FAKE" ) ); + draw_really_big_string( 10, cur_pos, clr, xors( "FAKE" ) ); } if( g_settings.rage.preserve_fps && g_settings.rage.enabled && util::is_low_fps( ) ) { -- cgit v1.2.3