diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-16 19:47:02 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-16 19:47:02 +0200 |
| commit | fb2b56fd3c26d37ef198fe6dbf651104656f8a34 (patch) | |
| tree | a945e6ca2ca0691656634644998b29b5619672eb /internal_rewrite | |
| parent | 559a0f5669f537e21f3d39780e6e3d77591ff8c1 (diff) | |
fd
Diffstat (limited to 'internal_rewrite')
| -rw-r--r-- | internal_rewrite/c_base_player.cpp | 4 | ||||
| -rw-r--r-- | internal_rewrite/create_move.cpp | 3 | ||||
| -rw-r--r-- | internal_rewrite/draw_model_execute.cpp | 110 | ||||
| -rw-r--r-- | internal_rewrite/netvar_proxy.hpp | 1 | ||||
| -rw-r--r-- | internal_rewrite/proxies.cpp | 16 | ||||
| -rw-r--r-- | internal_rewrite/ragebot.cpp | 4 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_antiaim.cpp | 1 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_lagcomp.cpp | 9 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_resolver.cpp | 18 | ||||
| -rw-r--r-- | internal_rewrite/ui_color_picker.h | 4 | ||||
| -rw-r--r-- | internal_rewrite/update_clientside_animation.cpp | 5 |
11 files changed, 96 insertions, 79 deletions
diff --git a/internal_rewrite/c_base_player.cpp b/internal_rewrite/c_base_player.cpp index 904fe32..47f9e36 100644 --- a/internal_rewrite/c_base_player.cpp +++ b/internal_rewrite/c_base_player.cpp @@ -733,9 +733,9 @@ void c_base_player::calc_anim_velocity( bool reset ) { if( anim_vel.length2d( ) < 1.f )
anim_vel = vec3_t( );
- int ticks = TIME_TO_TICKS( delta * .5f );
+ int ticks = TIME_TO_TICKS( delta * 0.5f );
vec3_t est_tick_vel = math::lerp( last_velocity, velocity, .5f );
- for( int i{ }; i < ticks; i++ ) {
+ for( int i{ }; i < ticks + 1; i++ ) {
if( est_tick_vel.length2d( ) < 1.f )
break;
diff --git a/internal_rewrite/create_move.cpp b/internal_rewrite/create_move.cpp index c2959d0..329c77b 100644 --- a/internal_rewrite/create_move.cpp +++ b/internal_rewrite/create_move.cpp @@ -71,6 +71,9 @@ bool __fastcall hooks::create_move( void* ecx_, void* edx_, float input_sample_f // Yeah. g_cheat.m_movement( ucmd ); + //SUPER SECRET EXPLOIT DO NOT LEAK + //ucmd->m_buttons |= IN_BULLRUSH; + // This should account for the majority of FPS related bugs. // Actual implementation of RunCommand. diff --git a/internal_rewrite/draw_model_execute.cpp b/internal_rewrite/draw_model_execute.cpp index 5d1ef0d..dac41ac 100644 --- a/internal_rewrite/draw_model_execute.cpp +++ b/internal_rewrite/draw_model_execute.cpp @@ -24,12 +24,14 @@ void __fastcall hooks::draw_model_execute( IVModelRender* ecx_, void* edx_, int team = 0;
bool is_player = false;
+
+
if( strstr( model_name, xors( "models/player" ) ) && info.m_entity_index == local_index ) {
if( g_settings.misc.thirdperson( ) && g_ctx.m_local && g_ctx.m_local->is_valid( )
&& g_ctx.m_local->m_bIsScoped( ) ) {
float clr[ ] = { 1.0f, 1.0f, 1.0f };
g_csgo.m_render_view( )->SetColorModulation( clr );
- g_csgo.m_render_view( )->SetBlend( 0.5f );
+ g_csgo.m_render_view( )->SetBlend( 0.3f );
return dme_o( ecx_, edx_, render_ctx, state, info, bone_to_world );
}
}
@@ -41,6 +43,59 @@ void __fastcall hooks::draw_model_execute( IVModelRender* ecx_, void* edx_, is_player = true;
team = player->m_iTeamNum( );
+ if( is_player ) {
+ bool should_draw = false;
+ if( g_settings.rage.enabled( ) && g_settings.rage.resolver( ) && g_settings.rage.bt_visualize( ) && ( team != local_team || g_settings.rage.friendlies( ) ) )
+ should_draw = true;
+ if( g_settings.legit.enabled( ) && g_settings.legit.backtracking_visualize( ) && ( team != local_team || g_settings.rage.friendlies( ) ) )
+ should_draw = true;
+
+
+ if( should_draw ) {
+ matrix3x4 render_matrix[ 128 ];
+
+ if( g_cheat.m_ragebot.m_lagcomp->get_render_record( info.m_entity_index, render_matrix ) ) {
+ fclr_t clr_hid = team != local_team ? g_settings.visuals.chams.color_hidden_enemy( ).to_fclr( ) : g_settings.visuals.chams.color_hidden_friendly( ).to_fclr( );
+
+ float backup_modulation[ 3 ]{ };
+ bool backup_ignorez = false;
+ bool wanted_ignorez = g_settings.visuals.chams.ignore_z( );
+ float backup_blend = 1.0f;
+
+ backup_blend = g_csgo.m_render_view( )->GetBlend( );
+ g_csgo.m_render_view( )->GetColorModulation( backup_modulation );
+
+ //BIG ROFL
+ if( backup_modulation[ 0 ] == clr_hid.r( ) && backup_modulation[ 1 ] == clr_hid.g( ) && backup_modulation[ 2 ] == clr_hid.b( )
+ && backup_blend == clr_hid.a( ) ) {
+ backup_ignorez = true;
+ }
+
+ if( backup_ignorez == wanted_ignorez || ( !backup_ignorez && !g_settings.visuals.chams.clear_occlusion( ) ) || !g_settings.visuals.chams.enabled( ) ) {
+ auto flat_mat = g_cheat.m_chams.m_materials.m_chams_flat.m_mat;
+ flat_mat->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, g_settings.visuals.chams.ignore_z && g_settings.visuals.chams.enabled );
+
+ clr_t bt_col = g_settings.legit.enabled( ) ? g_settings.legit.backtracking_col( ) : g_settings.rage.bt_col( );
+
+ g_cheat.m_chams.m_materials.force_material( g_cheat.m_chams.m_materials.m_chams_flat, bt_col );
+
+ dme_o( ecx_, edx_, render_ctx, state, info, render_matrix );
+ flat_mat->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, backup_ignorez );
+ }
+
+ g_csgo.m_render_view( )->SetBlend( backup_blend );
+ g_csgo.m_render_view( )->SetColorModulation( backup_modulation );
+ g_csgo.m_model_render( )->ForcedMaterialOverride( g_settings.visuals.chams.enabled( ) &&
+ ( team != local_team || g_settings.visuals.chams.friendlies( ) ) ? mat : nullptr );
+
+ if( draw ) {
+ //dme_o( ecx_, edx_, render_ctx, state, info, bone_to_world );
+ //draw = false;
+ }
+ }
+ }
+ }
+
if( g_settings.visuals.chams.enabled ) {
if( g_settings.visuals.chams.ignore_z && !g_ctx.m_drawing_screneend && ( team != local_team || g_settings.visuals.chams.friendlies( ) ) && g_settings.visuals.chams.clear_occlusion )
draw = false;
@@ -74,59 +129,6 @@ void __fastcall hooks::draw_model_execute( IVModelRender* ecx_, void* edx_, }
}
- if( is_player ) {
- bool should_draw = false;
- if( g_settings.rage.enabled( ) && g_settings.rage.resolver( ) && g_settings.rage.bt_visualize( ) && ( team != local_team || g_settings.rage.friendlies( ) ) )
- should_draw = true;
- if( g_settings.legit.enabled( ) && g_settings.legit.backtracking_visualize( ) && ( team != local_team || g_settings.rage.friendlies( ) ) )
- should_draw = true;
-
-
- if( should_draw ) {
- matrix3x4 render_matrix[ 128 ];
-
- if( g_cheat.m_ragebot.m_lagcomp->get_render_record( info.m_entity_index, render_matrix ) ) {
- fclr_t clr_hid = team != local_team ? g_settings.visuals.chams.color_hidden_enemy( ).to_fclr( ) : g_settings.visuals.chams.color_hidden_friendly( ).to_fclr( );
-
- float backup_modulation[ 3 ]{ };
- bool backup_ignorez = false;
- bool wanted_ignorez = g_settings.visuals.chams.ignore_z( );
- float backup_blend = 1.0f;
-
- backup_blend = g_csgo.m_render_view( )->GetBlend( );
- g_csgo.m_render_view( )->GetColorModulation( backup_modulation );
-
- //BIG ROFL
- if( backup_modulation[ 0 ] == clr_hid.r( ) && backup_modulation[ 1 ] == clr_hid.g( ) && backup_modulation[ 2 ] == clr_hid.b( )
- && backup_blend == clr_hid.a( ) ) {
- backup_ignorez = true;
- }
-
- if( backup_ignorez == wanted_ignorez || !backup_ignorez && !g_settings.visuals.chams.clear_occlusion( ) ) {
- auto flat_mat = g_cheat.m_chams.m_materials.m_chams_flat.m_mat;
- flat_mat->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, g_settings.visuals.chams.ignore_z && g_settings.visuals.chams.enabled );
-
- clr_t bt_col = g_settings.legit.enabled( ) ? g_settings.legit.backtracking_col( ) : g_settings.rage.bt_col( );
-
- g_cheat.m_chams.m_materials.force_material( g_cheat.m_chams.m_materials.m_chams_flat, bt_col );
-
- dme_o( ecx_, edx_, render_ctx, state, info, render_matrix );
- flat_mat->SetMaterialVarFlag( MATERIAL_VAR_IGNOREZ, backup_ignorez );
- }
-
- g_csgo.m_render_view( )->SetBlend( backup_blend );
- g_csgo.m_render_view( )->SetColorModulation( backup_modulation );
- g_csgo.m_model_render( )->ForcedMaterialOverride( g_settings.visuals.chams.enabled( ) &&
- ( team != local_team || g_settings.visuals.chams.friendlies( ) ) ? mat : nullptr );
-
- if( draw ) {
- dme_o( ecx_, edx_, render_ctx, state, info, bone_to_world );
- draw = false;
- }
- }
- }
- }
-
if( draw ) {
dme_o( ecx_, 0, render_ctx, state, info, bone_to_world );
}
diff --git a/internal_rewrite/netvar_proxy.hpp b/internal_rewrite/netvar_proxy.hpp index 9e039ae..113f212 100644 --- a/internal_rewrite/netvar_proxy.hpp +++ b/internal_rewrite/netvar_proxy.hpp @@ -30,7 +30,6 @@ namespace hooks } private: - //overcomplicated... RecvProp* m_target; RecvVarProxyFn m_original; }; diff --git a/internal_rewrite/proxies.cpp b/internal_rewrite/proxies.cpp index 11a12e3..4f70215 100644 --- a/internal_rewrite/proxies.cpp +++ b/internal_rewrite/proxies.cpp @@ -107,13 +107,15 @@ void __cdecl hooks::simtime_proxy_fn( const CRecvProxyData* proxy_data_const, vo auto ent = ( c_base_player* )( entity );
if( ent && ent->is_valid( ) && ent->has_valid_anim( ) && ( ent->m_iTeamNum( ) != g_ctx.m_local->m_iTeamNum( ) || g_settings.rage.friendlies( ) ) && ent != g_ctx.m_local ) {
- //printf( "val: %f (%d)\n", proxy_data_const->m_pRecvProp );
- //printf( "prop name: %s\n", proxy_data_const->m_pRecvProp->GetName( ) );
+ //float prev_simtime = ent->m_flSimulationTime( );
- if( !proxy_data_const->m_Value.m_Int ) {
- //return;
- }
- }
+ old_fn( proxy_data_const, entity, output );
- old_fn( proxy_data_const, entity, output );
+ //float simtime = ent->m_flSimulationTime( );
+
+ //if( std::abs( simtime - prev_simtime ) < TICK_INTERVAL( ) )
+ // simtime = prev_simtime;
+ }
+ else
+ old_fn( proxy_data_const, entity, output );
}
\ No newline at end of file diff --git a/internal_rewrite/ragebot.cpp b/internal_rewrite/ragebot.cpp index 28dae0a..b0f6c13 100644 --- a/internal_rewrite/ragebot.cpp +++ b/internal_rewrite/ragebot.cpp @@ -291,8 +291,8 @@ namespace features };
constexpr std::array< std::pair< PlayerHitboxes_t, int >, 15 > hitbox_order = {
- std::make_pair( HITBOX_HEAD, 4 ),
- std::make_pair( HITBOX_NECK, 4 ),
+ std::make_pair( HITBOX_HEAD, 3 ),
+ std::make_pair( HITBOX_NECK, 3 ),
std::make_pair( HITBOX_PELVIS, 3 ),
std::make_pair( HITBOX_BODY, 3 ),
diff --git a/internal_rewrite/ragebot_antiaim.cpp b/internal_rewrite/ragebot_antiaim.cpp index 1a269d2..5a9186c 100644 --- a/internal_rewrite/ragebot_antiaim.cpp +++ b/internal_rewrite/ragebot_antiaim.cpp @@ -124,6 +124,7 @@ namespace features real_angle.x = pitch;
}
+ g_ctx.m_local->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount -= 1;
g_ctx.m_local->get_animstate( )->update( real_angle.y, real_angle.x );
g_csgo.m_globals->m_curtime = backup_curtime;
diff --git a/internal_rewrite/ragebot_lagcomp.cpp b/internal_rewrite/ragebot_lagcomp.cpp index 0401f05..b9a072a 100644 --- a/internal_rewrite/ragebot_lagcomp.cpp +++ b/internal_rewrite/ragebot_lagcomp.cpp @@ -406,9 +406,10 @@ namespace features float last_simtime = m_last_simtime[ i ];
float simtime = ent->m_flSimulationTime( );
- bool yaw_change = g_cheat.m_ragebot.m_resolver->yaw_change( i );
-
if( !!std::abs( simtime - last_simtime ) ) {
+ g_cheat.m_ragebot.m_resolver->update_player( i );
+ bool yaw_change = g_cheat.m_ragebot.m_resolver->yaw_change( i );
+
ent->calc_anim_velocity( was_dormant[ i ] );
bool is_moving = ent->get_anim_velocity( ).length2d( ) > 0.1f && !ent->is_fakewalking( )
@@ -472,13 +473,13 @@ namespace features }
}
+
+ g_cheat.m_ragebot.m_resolver->yaw_change( i ) = false;
}
ent->do_ent_interpolation( false );
m_last_simtime[ i ] = simtime;
- g_cheat.m_ragebot.m_resolver->yaw_change( i ) = false;
-
while( !m_data_lby[ i ].empty( ) &&
m_data_lby[ i ].size( ) > TIME_TO_TICKS( 1.0f ) ) {
m_data_lby[ i ].pop_back( );
diff --git a/internal_rewrite/ragebot_resolver.cpp b/internal_rewrite/ragebot_resolver.cpp index 0a7174e..a35a55d 100644 --- a/internal_rewrite/ragebot_resolver.cpp +++ b/internal_rewrite/ragebot_resolver.cpp @@ -42,7 +42,7 @@ namespace features }
int c_ragebot::c_resolver::try_freestanding( c_base_player* ent ) {
- if( !( ent->m_fFlags( ) & FL_ONGROUND ) || ( ent->m_vecVelocity( ).length2d( ) > 0.1f && !ent->is_fakewalking( ) ) )
+ if( !( ent->m_fFlags( ) & FL_ONGROUND ) || ( ent->get_anim_velocity( ).length2d( ) > 0.1f && !ent->is_fakewalking( ) ) )
return -1;
int ret_dir = -1;
@@ -163,7 +163,7 @@ namespace features return;
}
- if( ent->m_vecVelocity( ).length2d( ) > 0.1f && !ent->is_fakewalking( ) ) {
+ if( ent->get_anim_velocity( ).length2d( ) > 0.1f && !ent->is_fakewalking( ) ) {
m_breaking = BREAKING_NONE;
m_has_valid_lby = true;
return;
@@ -227,7 +227,7 @@ namespace features auto& data = m_data[ ent_index ];
auto ent = g_csgo.m_entlist( )->GetClientEntity< >( ent_index );
- bool moving = ent->m_vecVelocity( ).length2d( ) > 0.1f && ( ent->m_fFlags( ) & FL_ONGROUND );
+ bool moving = ent->get_anim_velocity( ).length2d( ) > 0.1f && ( ent->m_fFlags( ) & FL_ONGROUND );
if( moving && !ent->is_fakewalking( ) ) {
return;
@@ -434,6 +434,12 @@ namespace features }
void c_ragebot::c_resolver::update_player( int i ) {
+ if( !g_settings.rage.enabled( ) || !g_settings.rage.resolver( ) )
+ return;
+
+ if( !g_cheat.m_player_mgr.is_cheater( i ) )
+ return;
+
auto ent = g_csgo.m_entlist( )->GetClientEntity( i );
bool was_invalid = m_data[ i ].m_was_invalid;
@@ -476,7 +482,7 @@ namespace features if( ent->m_iTeamNum( ) == g_ctx.m_local->m_iTeamNum( ) && !g_settings.rage.friendlies )
continue;
- update_player( i );
+ //update_player( i );
}
}
@@ -485,7 +491,7 @@ namespace features }
int c_ragebot::c_resolver::manual_override( c_base_player* ent ) {
- if( ent->m_vecVelocity( ).length( ) > 0.1f && !ent->is_fakewalking( ) ) { //no point in overriding moving targets, it will also fuck up backtrack records otherwise
+ if( ent->get_animdata( ).m_anim_velocity.length2d( ) > 0.1f && !ent->is_fakewalking( ) ) { //no point in overriding moving targets, it will also fuck up backtrack records otherwise
return OVERRIDE_NONE;
}
@@ -524,7 +530,7 @@ namespace features if( ent->m_flSimulationTime( ) == g_cheat.m_ragebot.m_lagcomp->get_last_updated_simtime( ent->ce( )->GetIndex( ) ) )
return;
- if( ent->m_vecVelocity( ).length( ) > 0.1f && ( ent->m_fFlags( ) & FL_ONGROUND ) && !ent->is_fakewalking( ) ) {
+ if( ent->get_anim_velocity( ).length( ) > 0.1f && ( ent->m_fFlags( ) & FL_ONGROUND ) && !ent->is_fakewalking( ) ) {
m_data[ ent->ce( )->GetIndex( ) ].m_last_moving_lby = ent->m_flLowerBodyYawTarget( );
m_data[ ent->ce( )->GetIndex( ) ].m_has_valid_lby = true;
force_lby( ent );
diff --git a/internal_rewrite/ui_color_picker.h b/internal_rewrite/ui_color_picker.h index 7155691..8404e19 100644 --- a/internal_rewrite/ui_color_picker.h +++ b/internal_rewrite/ui_color_picker.h @@ -147,7 +147,7 @@ namespace ui }; auto is_alpha_slider_hovered = [&]( ) -> bool { - return mouse_x > x + 1 && mouse_x < x + 122 + return mouse_x > x + 0 && mouse_x < x + 122 && mouse_y > y + 110 && mouse_y < y + 124; }; @@ -172,7 +172,7 @@ namespace ui draw_slider_alpha( ); if ( is_alpha_slider_hovered( ) && g_input.is_key_pressed( KEYS_MOUSE1 ) ) { - int delta = std::clamp( mouse_x - x, 0, 121 ); + int delta = std::clamp( mouse_x - x, -1, 122 ); m_alpha = ( int )( float( delta ) * 255.f / 121.f ); } diff --git a/internal_rewrite/update_clientside_animation.cpp b/internal_rewrite/update_clientside_animation.cpp index 5dc14e6..cef0d0c 100644 --- a/internal_rewrite/update_clientside_animation.cpp +++ b/internal_rewrite/update_clientside_animation.cpp @@ -32,9 +32,12 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { last_update = g_csgo.m_globals->m_curtime;
- if( g_cheat.m_lagmgr.get_choked( ) == 1 )
+ if( g_cheat.m_lagmgr.get_choked( ) == 1 || g_cheat.m_lagmgr.get_sent( ) > 1 )
ent->cache_anim_data( );
+ ent->get_animstate( )->m_iLastClientSideAnimationUpdateFramecount = g_csgo.m_globals->m_framecount;
+ old_func( ecx_, edx_ );
+
if( !first_update ) {
ent->restore_anim_data( true );
|
