diff options
| author | navewindre <boneyaard@gmail.com> | 2018-12-24 00:36:10 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-12-24 00:36:10 +0100 |
| commit | f41bf6509390f12a4252f40daf0209e7a7d64666 (patch) | |
| tree | 79ed2c592ee15bc0e97a6d2f9c2a92226281009e | |
| parent | fef68b3881d7b1a60abe2be85dde27b7b0ada3c3 (diff) | |
d
| -rw-r--r-- | cheat/internal_rewrite/begin_lock.cpp | 2 | ||||
| -rw-r--r-- | cheat/internal_rewrite/c_base_player.cpp | 12 | ||||
| -rw-r--r-- | cheat/internal_rewrite/c_base_player.hpp | 16 | ||||
| -rw-r--r-- | cheat/internal_rewrite/lag_mgr.cpp | 16 | ||||
| -rw-r--r-- | cheat/internal_rewrite/ragebot.hpp | 1 | ||||
| -rw-r--r-- | cheat/internal_rewrite/ragebot_antiaim.cpp | 59 | ||||
| -rw-r--r-- | cheat/internal_rewrite/ui.h | 7 | ||||
| -rw-r--r-- | cheat/internal_rewrite/update_clientside_animation.cpp | 9 |
8 files changed, 68 insertions, 54 deletions
diff --git a/cheat/internal_rewrite/begin_lock.cpp b/cheat/internal_rewrite/begin_lock.cpp index 5312eec..fb4bdf1 100644 --- a/cheat/internal_rewrite/begin_lock.cpp +++ b/cheat/internal_rewrite/begin_lock.cpp @@ -58,7 +58,7 @@ void __fastcall hooks::begin_lock( void* ecx, void* edx ) { // THIS IS PROLLY NO g_cheat.m_player_mgr.frame_stage_notify( );
g_cheat.m_prediction.frame_stage_notify( );
- g_cheat.m_ragebot.m_resolver->frame_stage_notify( );
+ //g_cheat.m_ragebot.m_resolver->frame_stage_notify( );
g_cheat.m_ragebot.m_lagcomp->fsn_render_start( );
g_cheat.m_skins( );
}
diff --git a/cheat/internal_rewrite/c_base_player.cpp b/cheat/internal_rewrite/c_base_player.cpp index c2364a7..d0c8272 100644 --- a/cheat/internal_rewrite/c_base_player.cpp +++ b/cheat/internal_rewrite/c_base_player.cpp @@ -614,8 +614,8 @@ void c_base_player::do_ent_interpolation( bool reset ) { if( !isfinite( vec_lerp[ i ] ) )
return;
- byte backup = *( byte* )( uintptr_t( this ) + 0x270 );
- *( byte* )( uintptr_t( this ) + 0x270 ) = 0;
+ byte backup = *( byte* )( uintptr_t( this ) + 0x274 );
+ *( byte* )( uintptr_t( this ) + 0x274 ) = 0;
restore_anim_data( true );
@@ -627,7 +627,7 @@ void c_base_player::do_ent_interpolation( bool reset ) { ce( )->SetupBones( nullptr, -1, BONE_USED_BY_ANYTHING, g_csgo.m_globals->m_curtime );
this->m_iMostRecentModelBoneCounter( )++;
- *( byte* )( uintptr_t( this ) + 0x270 ) = backup;
+ *( byte* )( uintptr_t( this ) + 0x274 ) = backup;
}
void c_base_player::validate_animation_layers( ) {
@@ -1006,8 +1006,8 @@ void c_base_player::fix_animations( bool reset, bool resolver_change ) { //clear occlusion for setupbones (pvs fix)
*( int* )( uintptr_t( this ) + 0xa30 ) = 0;
- byte backup = get< byte >( 0x270 );
- get< byte >( 0x270 ) = 0;
+ byte backup = get< byte >( 0x274 );
+ get< byte >( 0x274 ) = 0;
invalidate_bone_cache( );
ce( )->SetupBones( nullptr, -1, BONE_USED_BY_ANYTHING, anim_time );
@@ -1022,7 +1022,7 @@ void c_base_player::fix_animations( bool reset, bool resolver_change ) { //disable animations again
m_bClientSideAnimation( ) = false;
- get< byte >( 0x270 ) = backup;
+ get< byte >( 0x274 ) = backup;
}
player_info_t c_base_player::get_info( ) {
diff --git a/cheat/internal_rewrite/c_base_player.hpp b/cheat/internal_rewrite/c_base_player.hpp index 690f55c..7eeb9d3 100644 --- a/cheat/internal_rewrite/c_base_player.hpp +++ b/cheat/internal_rewrite/c_base_player.hpp @@ -263,7 +263,7 @@ public: NETVAR( m_vecOrigin, "m_vecOrigin", "DT_BaseEntity", 0, vec3_t ); NETVAR( m_vecViewOffset, "m_vecViewOffset[0]", "DT_BasePlayer", 0, vec3_t ); NETVAR( m_hActiveWeapon, "m_hActiveWeapon", "DT_BaseCombatCharacter", 0, ulong_t ); - NETVAR( m_iTeamNum, "m_iTeamNum", "DT_BaseEntity", 0, int ); + NETVAR( m_bHasHelmet, "m_bHasHelmet", "DT_CSPlayer", 0, bool ); NETVAR( m_bHasDefuser, "m_bHasDefuser", "DT_CSPlayer", 0, bool ); NETVAR( m_ArmorValue, "m_ArmorValue", "DT_CSPlayer", 0, int ); @@ -347,6 +347,20 @@ public: return util::get_vfunc< 187, void >( this, curtime ); } + __forceinline int& m_iTeamNum( ) { + static auto team_num = g_netvars.get_netvar( fnv( "DT_BaseEntity" ), fnv( "m_iTeamNum" ) ); + static auto survival_team = g_netvars.get_netvar( fnv( "DT_CSPlayer" ), fnv( "m_nSurvivalTeam" ) ); + + //char name[ 32 ]; + //get_name_safe( name ); + + //printf( "%s: %d (%08x)\n", name, get< int >( survival_team ), survival_team ); + if( get< int >( survival_team ) != -1 ) + return get< int >( survival_team ); + + return get< int >( team_num ); + } + __forceinline void standard_blending_rules( void* hdr, vec3_t* pos, void* q, float curtime, int bone_mask ) { return util::get_vfunc< 200, void >( this, hdr, pos, q, curtime, bone_mask ); } diff --git a/cheat/internal_rewrite/lag_mgr.cpp b/cheat/internal_rewrite/lag_mgr.cpp index 092cfe1..3606500 100644 --- a/cheat/internal_rewrite/lag_mgr.cpp +++ b/cheat/internal_rewrite/lag_mgr.cpp @@ -54,8 +54,9 @@ namespace features //2018 sucked //but 2019 will be better - if( !g_settings.rage.fakelag.mode( ) || - !g_settings.rage.fakelag.ticks( ) ) { + if( ( !g_settings.rage.fakelag.mode( ) || + !g_settings.rage.fakelag.ticks( ) ) && + !g_settings.rage.fake_yaw ) { m_breaking_lc = false; return; } @@ -91,9 +92,13 @@ namespace features max_ticks = math::min( max_ticks, 16 ); + bool force_send = m_held_ticks >= max_ticks; + bool send = true; + if( !moving && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) && g_settings.rage.anti_aim( ) && g_settings.rage.fake_yaw ) { + send = force_send = get_choked( ) >= math::max( max_ticks, 10 ); + } - bool force_send = m_held_ticks >= max_ticks; if( settings.mode == 1 ) { if( delta.length2dsqr( ) > 4096.f ) { force_send = get_choked( ) > 3; @@ -119,11 +124,8 @@ namespace features } - bool send = true; - static bool was_onground{ }; - if( !moving && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) && g_settings.rage.anti_aim( ) && g_settings.rage.fake_yaw ) - send = false; + static bool was_onground{ }; if( settings.in_move && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) && moving ) { send = false; diff --git a/cheat/internal_rewrite/ragebot.hpp b/cheat/internal_rewrite/ragebot.hpp index 7bc6c24..c9eb4f2 100644 --- a/cheat/internal_rewrite/ragebot.hpp +++ b/cheat/internal_rewrite/ragebot.hpp @@ -118,6 +118,7 @@ namespace features bool run_freestanding( int player = -1 );
bool run_edge_dtc( );
+ float desync_delta( );
public:
bool is_fakewalking( ) const { return m_is_fakewalking; }
diff --git a/cheat/internal_rewrite/ragebot_antiaim.cpp b/cheat/internal_rewrite/ragebot_antiaim.cpp index 0e05e8a..4e7f185 100644 --- a/cheat/internal_rewrite/ragebot_antiaim.cpp +++ b/cheat/internal_rewrite/ragebot_antiaim.cpp @@ -86,6 +86,23 @@ namespace features }*/
+ float c_ragebot::c_antiaim::desync_delta( ) {
+ auto state = g_ctx.m_local->get_animstate( );
+
+ float duck_amt = state->m_fDuckAmount;
+ 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;
+ if( duck_amt > 0.f )
+ unk += ( ( duck_amt * speed_factor ) * ( 0.5f - unk ) );
+
+ //not exact but who cares
+ float max_delta = 57.5f * unk;
+
+ return max_delta;
+ }
+
void c_ragebot::c_lby_breaker::update_animstate( ) {
if( !g_settings.rage.anti_aim( ) )
return;
@@ -119,7 +136,11 @@ namespace features g_ctx.m_local->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount -= 1;
g_ctx.m_local->get_animstate( )->update( real_angle.y, real_angle.x );
- g_ctx.m_local->cache_anim_data( );
+
+ if( !g_cheat.m_lagmgr.get_state( ) ) {
+ g_ctx.m_absyaw = g_ctx.m_local->get_animstate( )->m_flGoalFeetYaw;
+ g_ctx.m_local->cache_anim_data( );
+ }
g_csgo.m_globals->m_curtime = backup_curtime;
g_csgo.m_globals->m_frametime = backup_frametime;
@@ -208,7 +229,7 @@ namespace features }
if( std::abs( offset ) < 105 ) {
- int min_tick = g_cheat.m_ragebot.m_antiaim->is_fakewalking( ) ? g_settings.rage.fakewalk_ticks( ) + 2 : 4;
+ int min_tick = 3;
if( update_ticks < min_tick && update_ticks >= 1 ) {
*angles = break_angle + ( offset < 0 ? 105 : -105 );
return;
@@ -537,7 +558,7 @@ namespace features }
if( is_fake ) {
- aim_angle.y -= 50.f;
+ aim_angle.y -= desync_delta( );
}
else {
int jitter = g_settings.rage.edge_dtc_real_jitter;
@@ -789,6 +810,10 @@ namespace features float step = float( g_settings.rage.angle_step_degrees( ) );
original = math::find_closest_step( original, step );
}
+
+ 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 );
}
@@ -870,32 +895,10 @@ namespace features freestanding = run_freestanding( );
}
- m_is_edging = freestanding || edge_detected;
-
- if( g_settings.rage.break_lby( ) && ( !m_is_edging || g_settings.rage.break_lby_edge ) ) {
- float yaw;
-
- if( m_is_edging ) {
- auto target = util::get_closest_player( );
- if( target != -1 ) {
- auto ent = g_csgo.m_entlist( )->GetClientEntity< >( target );
-
- vec3_t ang = math::vector_angles(
- ent->m_vecOrigin( ),
- g_ctx.m_local->m_vecOrigin( ) );
-
- yaw = std::remainderf( ang.y + ( m_direction ? -90.f : 90.f ), 360.f );
- }
- }
- else {
- yaw = get_yaw( true );
- }
+ if( m_breaker.get_next_update( ) < 0 && !g_cheat.m_lagmgr.get_state( ) )
+ m_cmd->m_viewangles.y = g_ctx.m_last_realangle.y + 115.f;
- m_breaker.override_angles( &m_cmd->m_viewangles.y,
- yaw,
- std::remainderf( 180.f - float( g_settings.rage.lby_delta ), 360.f ),
- freestanding );
- }
+ m_is_edging = freestanding || edge_detected;
if( g_cheat.m_lagmgr.get_state( ) && !g_settings.rage.fake_yaw( ) )
m_cmd->m_viewangles.y = g_csgo.m_engine( )->GetViewAngles( ).y;
diff --git a/cheat/internal_rewrite/ui.h b/cheat/internal_rewrite/ui.h index 9a32603..073a980 100644 --- a/cheat/internal_rewrite/ui.h +++ b/cheat/internal_rewrite/ui.h @@ -879,13 +879,6 @@ namespace ui 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" ) );
- static auto fakeping_form = menu->find_item( xors( "fake latency" ) );
-
- auto game_rules = c_base_player::get_game_rules( );
- if( game_rules ) {
- fakeping_form->set_visible( !*( bool* )( game_rules + 0x75 ) );
- }
-
render_item( menu.get( ) );
// This was annoying me so I decided to remove it in Release mode.
diff --git a/cheat/internal_rewrite/update_clientside_animation.cpp b/cheat/internal_rewrite/update_clientside_animation.cpp index b01d0f0..243d760 100644 --- a/cheat/internal_rewrite/update_clientside_animation.cpp +++ b/cheat/internal_rewrite/update_clientside_animation.cpp @@ -40,9 +40,8 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { if( !first_update ) {
g_ctx.m_local->restore_anim_data( true );
- ent->set_abs_angles( vec3_t( 0, ent->get_animstate( )->m_flGoalFeetYaw, 0 ) );
- bool backup = ent->get_animstate( )->m_bOnGround;
- ent->get_animstate( )->m_bOnGround = false;
+ ent->set_abs_angles( vec3_t( 0, g_ctx.m_absyaw, 0 ) );
+ //ent->get_animstate( )->m_bOnGround = false;
ent->invalidate_bone_cache( );
@@ -58,8 +57,10 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { }
}
+ byte backup = ent->get< byte >( 0x274 );
+ ent->get< byte >( 0x274 ) = 0;
ent->ce( )->SetupBones( nullptr, 128, BONE_USED_BY_ANYTHING, 0.f );
- ent->get_animstate( )->m_bOnGround = backup;
+ ent->get< byte >( 0x274 ) = backup;
}
first_update = false;
|
