From 2f8e2c585c14ec4bae7b31d17799d56ea3e50348 Mon Sep 17 00:00:00 2001 From: navewindre Date: Tue, 25 Dec 2018 20:27:23 +0100 Subject: dsad --- cheat/internal_rewrite/c_base_player.cpp | 2 +- cheat/internal_rewrite/context.cpp | 4 ++-- cheat/internal_rewrite/ragebot.cpp | 4 ++-- cheat/internal_rewrite/ragebot_antiaim.cpp | 31 ++++++++++++++++++++++-------- cheat/internal_rewrite/ui.h | 5 ----- cheat/internal_rewrite/visual_local.cpp | 4 +++- cheat/internal_rewrite/visual_player.cpp | 8 ++++---- 7 files changed, 35 insertions(+), 23 deletions(-) (limited to 'cheat/internal_rewrite') diff --git a/cheat/internal_rewrite/c_base_player.cpp b/cheat/internal_rewrite/c_base_player.cpp index d0c8272..140ab8a 100644 --- a/cheat/internal_rewrite/c_base_player.cpp +++ b/cheat/internal_rewrite/c_base_player.cpp @@ -864,7 +864,7 @@ void c_base_player::fix_animations( bool reset, bool resolver_change ) { get_animstate( )->m_flGoalFeetYaw = get_animstate( )->m_flCurrentFeetYaw = feet_yaw; }*/ - //get_animstate( )->m_flFeetYawRate = 0.f; + get_animstate( )->m_flFeetYawRate = 0.f; //why? //because this calls pAttachmentHelper->CalcAbsVelocity diff --git a/cheat/internal_rewrite/context.cpp b/cheat/internal_rewrite/context.cpp index 4de1479..77dfb34 100644 --- a/cheat/internal_rewrite/context.cpp +++ b/cheat/internal_rewrite/context.cpp @@ -30,9 +30,9 @@ void c_context::on_cmove_end( user_cmd_t* cmd ) { //m_last_realangle.x = m_last_fakeangle.x; } - if( !g_cheat.m_lagmgr.get_state( ) ) { + //if( !g_cheat.m_lagmgr.get_state( ) ) { m_thirdperson_angle = cmd->m_viewangles; - } + //} m_thirdperson_angle.x = std::clamp( cmd->m_viewangles.x, -89.f, 89.f ); if( g_cheat.m_lagmgr.get_sent( ) > 1 ) { diff --git a/cheat/internal_rewrite/ragebot.cpp b/cheat/internal_rewrite/ragebot.cpp index 19034df..e798ef0 100644 --- a/cheat/internal_rewrite/ragebot.cpp +++ b/cheat/internal_rewrite/ragebot.cpp @@ -1015,7 +1015,7 @@ namespace features g_cheat.m_visuals.store_shot( target.m_position ); - if( !target.m_backtracked && g_cheat.m_player_mgr.is_cheater( target.m_ent_index ) ) { + /*if( !target.m_backtracked && g_cheat.m_player_mgr.is_cheater( target.m_ent_index ) ) { m_resolver->aimbot( target.m_ent_index, target.m_hitbox, angle, @@ -1024,7 +1024,7 @@ namespace features target.m_max, target.m_radius ); } - else { + else*/ { context::shot_data_t new_shot{ }; new_shot.m_angle = angle; new_shot.m_enemy_index = target.m_ent_index; diff --git a/cheat/internal_rewrite/ragebot_antiaim.cpp b/cheat/internal_rewrite/ragebot_antiaim.cpp index fa85598..ac050c9 100644 --- a/cheat/internal_rewrite/ragebot_antiaim.cpp +++ b/cheat/internal_rewrite/ragebot_antiaim.cpp @@ -93,13 +93,22 @@ namespace features float speed_fraction = std::clamp( state->m_flFeetSpeedForwardsOrSideWays, 0.f, 1.f ); float speed_factor = std::clamp( state->m_flFeetSpeedUnknownForwardOrSideways, 0.f, 1.f ); - float unk = ( *( float* )( uintptr_t( state ) + 0x11c ) * -0.30000001f - 0.19999999f ) * speed_fraction + 1.f; + float unk = ( ( state->m_flStopToFullRunningFraction * -0.30000001f ) - 0.19999999f ) * speed_fraction; + float unk2 = unk + 1.f; if( duck_amt > 0.f ) - unk += ( ( duck_amt * speed_factor ) * ( 0.5f - unk ) ); + unk2 += ( ( duck_amt * speed_factor ) * ( 0.5f - unk2 ) ); //not exact but who cares - float max_delta = 57.5f * unk; - + float max_delta = *( float* )( state + 0x334 ) * unk2; + + /*float delta_eye_yaw = std::remainderf( state->m_flEyeYaw - state->m_flGoalFeetYaw, 360.f ); + float v52 = state->m_flEyeYaw - state->m_flGoalFeetYaw; + if( state->m_flEyeYaw <= state->m_flGoalFeetYaw ) { + if( v52 <= -180.f ) + v52 += 360.f; + } else if( v52 >= 180.f ) + v52 -= 360.f; + */ return max_delta; } @@ -558,7 +567,7 @@ namespace features } if( is_fake ) { - aim_angle.y -= desync_delta( ); + aim_angle.y = g_ctx.m_local->get_animstate( )->m_flGoalFeetYaw + desync_delta( ); } else { int jitter = g_settings.rage.edge_dtc_real_jitter; @@ -650,8 +659,12 @@ namespace features g_ctx.get_last_cmd( )->m_sidemove = ndir.y * wishspeed; }; - float delta = desync_delta( ); - if( delta < 50.f ) + auto state = g_ctx.m_local->get_animstate( ); + float max = *( float* )( state + 0x334 ); + float delta = g_cheat.m_ragebot.m_antiaim->desync_delta( ); + + float percent = delta / max; + if( percent < 0.99f ) quick_stop( ); } @@ -777,7 +790,7 @@ namespace features } if( is_fake && g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) - return g_ctx.m_last_realangle.y - desync_delta( ); + return g_ctx.m_local->get_animstate( )->m_flGoalFeetYaw + desync_delta( );; return get_yaw( false, original, no_jitter ); } @@ -860,6 +873,8 @@ namespace features freestanding = run_freestanding( ); } + // we want the eye - feet delta to be less than desync delta + // this will work 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; diff --git a/cheat/internal_rewrite/ui.h b/cheat/internal_rewrite/ui.h index 50ca921..8142412 100644 --- a/cheat/internal_rewrite/ui.h +++ b/cheat/internal_rewrite/ui.h @@ -418,8 +418,6 @@ namespace ui 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( ); } ); } auto edge_form = std::make_shared< ui::c_form >( 0, 0, 215, 110, xors( "edge detection" ), 110 ); { @@ -859,9 +857,6 @@ namespace ui static auto jitter_real_moving = menu->find_item( xors( "real yaw moving jitter" ) ); jitter_real_moving->set_text( g_settings.rage.real_yaw_moving == 2 ? xors( "spin range" ) : xors( "real yaw moving jitter" ) ); - static auto jitter_fake = menu->find_item( xors( "fake yaw jitter" ) ); - jitter_fake->set_text( g_settings.rage.fake_yaw == 2 ? xors( "spin range" ) : xors( "fake yaw jitter" ) ); - static auto jitter_air = menu->find_item( xors( "in-air yaw jitter" ) ); jitter_air->set_text( g_settings.rage.air_yaw == 2 ? xors( "spin range" ) : xors( "in-air yaw jitter" ) ); diff --git a/cheat/internal_rewrite/visual_local.cpp b/cheat/internal_rewrite/visual_local.cpp index b9521a8..0cc08b8 100644 --- a/cheat/internal_rewrite/visual_local.cpp +++ b/cheat/internal_rewrite/visual_local.cpp @@ -157,7 +157,9 @@ namespace features } if( g_settings.rage.fake_yaw && g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) { - float max = 57.5f; + auto state = g_ctx.m_local->get_animstate( ); + + float max = *( float* )( state + 0x334 ); float delta = g_cheat.m_ragebot.m_antiaim->desync_delta( ); float percent = delta / max; diff --git a/cheat/internal_rewrite/visual_player.cpp b/cheat/internal_rewrite/visual_player.cpp index 2bcc6d3..7d8336d 100644 --- a/cheat/internal_rewrite/visual_player.cpp +++ b/cheat/internal_rewrite/visual_player.cpp @@ -551,7 +551,7 @@ namespace features right_pos += 9; } else if( is_fake && g_ctx.m_local->is_valid( ) ) { - if( ent->m_fFlags( ) & FL_ONGROUND && ent->get_anim_velocity( ).length2d( ) < 0.1f && !dormant && !g_settings.misc.hide_from_obs ) { + /*if( ent->m_fFlags( ) & FL_ONGROUND && ent->get_anim_velocity( ).length2d( ) < 0.1f && !dormant && !g_settings.misc.hide_from_obs ) { float update = g_cheat.m_ragebot.m_lagcomp->get_flick_time( i ); float delta = ( ent->m_flSimulationTime( ) - update ) * 0.9f; @@ -590,14 +590,14 @@ namespace features right_pos += 9; } - } - else { + }*/ + /*else { draw_string( x_pos, y_pos, ALIGN_LEFT, false, clr_t( 255, 255, 255, 255 * alpha ), xors( "fake" ) ); right_pos += 9; - } + }*/ } if( !!g_cheat.m_ragebot.m_resolver->get_state( i ) && !dormant && g_ctx.m_local->is_valid( ) && g_settings.misc.hide_from_obs( ) ) { -- cgit v1.2.3