diff options
| author | navewindre <boneyaard@gmail.com> | 2018-10-06 12:09:36 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-10-06 12:09:36 +0200 |
| commit | 3e0d8199fec5b6979dc280533de69dded4260a0f (patch) | |
| tree | d34767fd1041642024a41254c3488fb8e082b076 | |
| parent | 66dcb4cdcdb0d3efce0ba74c0c5ad79bc7c51111 (diff) | |
z\cxdtgs
| -rw-r--r-- | internal_rewrite/IClientMode.hpp | 50 | ||||
| -rw-r--r-- | internal_rewrite/begin_lock.cpp | 24 | ||||
| -rw-r--r-- | internal_rewrite/c_base_player.hpp | 2 | ||||
| -rw-r--r-- | internal_rewrite/draw_model_execute.cpp | 2 | ||||
| -rw-r--r-- | internal_rewrite/lag_mgr.cpp | 22 | ||||
| -rw-r--r-- | internal_rewrite/override_view.cpp | 13 | ||||
| -rw-r--r-- | internal_rewrite/paint_traverse.cpp | 1 | ||||
| -rw-r--r-- | internal_rewrite/ragebot.cpp | 27 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_antiaim.cpp | 30 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_resolver.cpp | 55 | ||||
| -rw-r--r-- | internal_rewrite/ui.h | 14 | ||||
| -rw-r--r-- | internal_rewrite/ui_draw.h | 4 | ||||
| -rw-r--r-- | internal_rewrite/util.cpp | 2 | ||||
| -rw-r--r-- | internal_rewrite/visual_local.cpp | 22 |
14 files changed, 174 insertions, 94 deletions
diff --git a/internal_rewrite/IClientMode.hpp b/internal_rewrite/IClientMode.hpp index 8f2142a..dc7d15d 100644 --- a/internal_rewrite/IClientMode.hpp +++ b/internal_rewrite/IClientMode.hpp @@ -133,38 +133,26 @@ public: float zNearViewmodel; float zFarViewmodel; - float m_flAspectRatio; - float m_flNearBlurDepth; - float m_flNearFocusDepth; - float m_flFarFocusDepth; - float m_flFarBlurDepth; - float m_flNearBlurRadius; - float m_flFarBlurRadius; - int m_nDoFQuality; - int m_nMotionBlurMode; - - float m_flShutterTime; - vec3_t m_vShutterOpenPosition; - vec3_t m_shutterOpenAngles; - vec3_t m_vShutterClosePosition; - vec3_t m_shutterCloseAngles; - - float m_flOffCenterTop; - float m_flOffCenterBottom; - float m_flOffCenterLeft; - float m_flOffCenterRight; - - bool m_bOffCenter : 1; - bool m_bRenderToSubrectOfLargerScreen : 1; - bool m_bDoBloomAndToneMapping : 1; - bool m_bDoDepthOfField : 1; - bool m_bHDRTarget : 1; - bool m_bDrawWorldNormal : 1; - bool m_bCullFrontFaces : 1; - bool m_bCacheFullSceneState : 1; - bool m_bRenderFlashlightDepthTranslucents : 1; + float m_flAspectRatio;
+ float m_flNearBlurDepth;
+ float m_flNearFocusDepth;
+ float m_flFarFocusDepth;
+ float m_flFarBlurDepth;
+ float m_flNearBlurRadius;
+ float m_flFarBlurRadius;
+ int m_nDoFQuality;
+ int m_nMotionBlurMode;
+ float m_flShutterTime;
+ vec3_t m_vShutterOpenPosition;
+ vec3_t m_shutterOpenAngles;
+ vec3_t m_vShutterClosePosition;
+ vec3_t m_shutterCloseAngles;
+ float m_flOffCenterTop;
+ float m_flOffCenterBottom;
+ float m_flOffCenterLeft;
+ float m_flOffCenterRight;
+ int m_iEdgeBlur; private: - char pad2[ 0x40 ]; }; class IClientMode { diff --git a/internal_rewrite/begin_lock.cpp b/internal_rewrite/begin_lock.cpp index b7e310e..ec4494b 100644 --- a/internal_rewrite/begin_lock.cpp +++ b/internal_rewrite/begin_lock.cpp @@ -16,14 +16,22 @@ void __fastcall hooks::begin_lock( void* ecx, void* edx ) { // THIS IS PROLLY NO g_cheat.m_visuals.world_modulate( );
if( g_settings.rage.anti_aim && g_ctx.run_frame( ) ) {
- auto& anims = g_ctx.m_local->get_animdata( ).m_animlayers;
-
- for( size_t i{ }; i < 13; ++i ) {
- auto& layer = g_ctx.m_local->m_AnimOverlay( ).GetElements( )[ i ];
-
- if( layer.m_flWeight != anims.at( i ).m_flWeight || layer.m_flCycle != anims.at( i ).m_flCycle ) {
- g_ctx.m_local->cache_anim_data( );
- break;
+ static float last_time = 0.f;
+
+ if( last_time != g_ctx.m_local->get_animstate( )->m_flLastClientSideAnimationUpdateTime ) {
+ auto& anims = g_ctx.m_local->get_animdata( ).m_animlayers;
+
+ for( size_t i{ }; i < 13; ++i ) {
+ auto& layer = g_ctx.m_local->m_AnimOverlay( ).GetElements( )[ i ];
+
+ if( layer.m_flWeight != anims.at( i ).m_flWeight || layer.m_flCycle != anims.at( i ).m_flCycle ) {
+ memcpy( &g_ctx.m_local->get_animdata( ).m_animlayers,
+ g_ctx.m_local->m_AnimOverlay( ).GetElements( ),
+ sizeof( C_AnimationLayer ) * 13 );
+
+ last_time = g_ctx.m_local->get_animstate( )->m_flLastClientSideAnimationUpdateTime;
+ break;
+ }
}
}
}
diff --git a/internal_rewrite/c_base_player.hpp b/internal_rewrite/c_base_player.hpp index b1999b7..440e189 100644 --- a/internal_rewrite/c_base_player.hpp +++ b/internal_rewrite/c_base_player.hpp @@ -302,7 +302,7 @@ public: PNETVAR( m_hMyWearables, "m_hMyWearables", "DT_BaseCombatCharacter", 0, uint32_t ); PNETVAR( m_hMyWeapons, "m_hMyWeapons", "DT_BaseCombatCharacter", 0, uint32_t ); NETVAR( m_hGroundEntity, "m_hGroundEntity", "DT_CSPlayer", 0, uint32_t ); - + NETVAR( m_flConstraintRadius, "m_flConstraintRadius", "DT_CSPlayer", 0, float ); OFFSET( m_CachedBoneData, 0x28FC + sizeof( void* ), CUtlVector< matrix3x4 > ); OFFSET( m_flSpawnTime, 0xA2A0, float ); diff --git a/internal_rewrite/draw_model_execute.cpp b/internal_rewrite/draw_model_execute.cpp index bd5b5fc..49825f6 100644 --- a/internal_rewrite/draw_model_execute.cpp +++ b/internal_rewrite/draw_model_execute.cpp @@ -24,7 +24,7 @@ void __fastcall hooks::draw_model_execute( IVModelRender* ecx_, void* edx_, int team = 0;
bool is_player = false;
-
+ //printf( "model: %s\n", model_name );
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( )
diff --git a/internal_rewrite/lag_mgr.cpp b/internal_rewrite/lag_mgr.cpp index 9189345..0c67a3c 100644 --- a/internal_rewrite/lag_mgr.cpp +++ b/internal_rewrite/lag_mgr.cpp @@ -74,7 +74,21 @@ namespace features if( settings.fluctuate ) max_ticks *= last_rand; +#ifdef _DEBUG + static auto cl_sendmove = pattern::first_code_match( g_csgo.m_engine.dll( ), xors( "55 8B EC A1 ? ? ? ? 81 EC ? ? ? ? B9 ? ? ? ? 53 8B 98" ), 0 ); + + ulong_t old; + VirtualProtect( ( void* )( cl_sendmove + 0xbd ), 1, PAGE_EXECUTE_READWRITE, &old ); + *( uint8_t* )( cl_sendmove + 0xbd ) = 50; + VirtualProtect( ( void* )( cl_sendmove + 0xbd ), 1, old, nullptr ); +#endif + + +#ifndef _DEBUG max_ticks = math::min( max_ticks, 14 ); +#else + max_ticks = math::min( max_ticks, 16 ); +#endif bool force_send = m_held_ticks >= max_ticks; if( settings.mode == 1 ) { @@ -166,13 +180,13 @@ namespace features } static int wep_choke = 0; + if( wep_choke ) + send = !--wep_choke; + 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( ) ) ) { @@ -182,7 +196,7 @@ namespace features *m_sendpacket = ( send || force_send ) && !get_sent( ); if( *m_sendpacket ) { - m_breaking_lc = delta.length2dsqr( ) > 4096.f; + m_breaking_lc = delta.length2d( ) > 64.f; last_rand = ( 1.f + math::random_number( -settings.fluctuate, settings.fluctuate( ) ) * 0.01f ); } } diff --git a/internal_rewrite/override_view.cpp b/internal_rewrite/override_view.cpp index 73daab4..579f83f 100644 --- a/internal_rewrite/override_view.cpp +++ b/internal_rewrite/override_view.cpp @@ -18,5 +18,18 @@ void __fastcall hooks::override_view( void* ecx_, void* edx_, CViewSetup* setup g_ctx.m_fov = setup->m_flFov; g_cheat.m_extra.thirdperson( ); + + if( g_settings.misc.no_scope && g_ctx.run_frame( ) && g_ctx.m_local->is_valid( ) && g_ctx.m_local->m_bIsScoped( ) ) { + int backup = setup->m_iEdgeBlur; + + setup->m_iEdgeBlur = 0; + + override_view_o( ecx_, edx_, setup ); + + setup->m_iEdgeBlur = backup; + + return; + } + override_view_o( ecx_, nullptr, setup ); }
\ No newline at end of file diff --git a/internal_rewrite/paint_traverse.cpp b/internal_rewrite/paint_traverse.cpp index ef2efe7..8376cdd 100644 --- a/internal_rewrite/paint_traverse.cpp +++ b/internal_rewrite/paint_traverse.cpp @@ -43,6 +43,7 @@ void __fastcall hooks::paint_traverse( void* ecx_, void* edx_, unsigned int pane if( panel && panel == mat_system_top_panel ) { //render your epic 2008 hake esp here g_renderer.draw_box( 0, 0, 1, 1, clr_t( 0, 0, 0, 1 ) ); + //g_renderer.draw_string( g_fonts.f_12, 100, 200, clr_t( 255, 255, 255, 255 ), "c: %d", g_csgo.m_global_state->get_client_state( )->m_chokedcommands ); if( !g_settings.misc.hide_from_obs ) g_cheat.m_visuals( ); diff --git a/internal_rewrite/ragebot.cpp b/internal_rewrite/ragebot.cpp index 71f5980..452dc9b 100644 --- a/internal_rewrite/ragebot.cpp +++ b/internal_rewrite/ragebot.cpp @@ -822,14 +822,19 @@ namespace features m_antiaim->run_fakewalk( );
}
+ if( g_settings.rage.active->m_auto_stop( ) == 5 ) {
+ m_cmd->m_buttons |= IN_DUCK;
+ }
if( hitchance && !util::hitchance( it, aim_ang,
g_settings.rage.active->m_hitchance, hitbox ) ) {
if( g_settings.rage.active->m_auto_stop( ) == 1 || g_settings.rage.active->m_auto_stop( ) == 4 )
quick_stop( m_cmd );
- if( g_settings.rage.active->m_auto_stop( ) == 5 )
- m_cmd->m_buttons |= IN_DUCK;
+ if( g_settings.rage.active->m_auto_stop( ) == 5 ) {
+ if( g_ctx.m_local->m_flDuckAmount( ) < 1.f )
+ quick_stop( m_cmd );
+ }
if( g_settings.rage.active->m_auto_stop( ) == 4 && g_cheat.m_lagmgr.get_choked( ) < 10 && !m_antiaim->is_fakewalking( ) )
g_cheat.m_lagmgr.set_state( false );
@@ -1088,18 +1093,18 @@ namespace features aim_target_t t{ };
bool is_zeus = wep->m_iItemDefinitionIndex( ) == WEAPON_TASER;
- if( m_target != -1 && !m_antiaim->is_fakewalking( ) )
- if( ( g_settings.rage.active->m_auto_stop == 2 || g_settings.rage.active->m_auto_stop == 5 ) && can_hit_target( m_target, &t, is_zeus, false ) ) {
- quick_stop( m_cmd );
- if( g_settings.rage.active->m_auto_stop == 5 )
- m_cmd->m_buttons |= IN_DUCK;
- }
- else if( g_settings.rage.active->m_auto_stop == 3 && can_hit_target( m_target, &t, is_zeus, false ) ) {
+ if( m_target != -1 && !m_antiaim->is_fakewalking( ) ) {
+ bool can_hit = can_hit_target( m_target, &t, is_zeus, false );
+
+ if( !can_hit )
+ m_target = -1;
+
+ else if( g_settings.rage.active->m_auto_stop == 3 && can_hit ) {
m_antiaim->run_fakewalk( );
//if( !g_cheat.m_lagmgr.get_choked( ) || g_cheat.m_lagmgr.get_state( ) )
- m_cmd->m_viewangles.y = m_antiaim->get_yaw( );
+ m_cmd->m_viewangles.y = m_antiaim->get_yaw( );
}
-
+ }
return;
}
diff --git a/internal_rewrite/ragebot_antiaim.cpp b/internal_rewrite/ragebot_antiaim.cpp index a3fa292..c73ad54 100644 --- a/internal_rewrite/ragebot_antiaim.cpp +++ b/internal_rewrite/ragebot_antiaim.cpp @@ -134,14 +134,17 @@ namespace features if( g_ctx.m_local->get_animstate( )->m_velocity < 0.1f )
g_ctx.m_local->get_animstate( )->m_velocity = 0.f;
- bool moving = g_ctx.m_local->get_animstate( )->m_velocity > 0.1f && g_ctx.m_local->get_animstate( )->m_bOnGround;
- float time = g_ctx.pred_time( );
+ bool moving = g_ctx.m_local->get_animstate( )->m_velocity > 0.1f;
+ bool onground = g_ctx.m_local->get_animstate( )->m_bOnGround;
- if( moving ) {
- m_next_update = time + 0.22f;
- }
- else if( time > m_next_update ) {
- m_next_update = time + 1.1f;
+ float time = g_ctx.pred_time( );
+
+ if( onground ) {
+ if( moving ) {
+ m_next_update = time + 0.22f;
+ } else if( time > m_next_update ) {
+ m_next_update = time + 1.1f;
+ }
}
if( g_ctx.m_tickbase > 0 ) {
@@ -186,7 +189,7 @@ namespace features return;
//yep
- if( !( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) )
+ if( !g_ctx.m_local->get_animstate( )->m_bOnGround )
return;
bool breaking = g_ctx.m_local->get_animstate( )->m_velocity < 0.1f;
@@ -519,7 +522,10 @@ namespace features m_direction = direction;
aim_angle.y += direction ? -90.f : 90.f;
- aim_angle.y = math::find_closest_step( aim_angle.y, 30.f );
+
+ if( g_settings.rage.angle_step ) {
+ aim_angle.y = math::find_closest_step( aim_angle.y, g_settings.rage.angle_step_degrees );
+ }
if( g_settings.rage.pitch == 3 && g_settings.rage.break_lby_edge && m_breaker.get_next_update( ) < 2 && g_ctx.m_local->get_animstate( )->m_velocity < 0.1f ) {
vec3_t eye_pos = g_ctx.m_local->get_eye_pos( );
@@ -591,7 +597,7 @@ namespace features vec3_t vel = g_ctx.m_local->m_vecVelocity( );
float speed = vel.length2d( );
- if( speed < 1.f ) {
+ if( speed < 0.1f ) {
g_ctx.get_last_cmd( )->m_forwardmove = 0.f;
g_ctx.get_last_cmd( )->m_sidemove = 0.f;
return;
@@ -649,7 +655,7 @@ namespace features g_cheat.m_lagmgr.set_state( false );
}
- if( ticks_to_stop > ticks_left - 1 || !choked ) {
+ if( ticks_left <= ticks_to_stop || !choked ) {
quick_stop( );
}
}
@@ -662,8 +668,6 @@ namespace features return g_cheat.m_lagmgr.get_state( ) ? 75.f : 89.f;
case 3:
return 89.f;
- // These won't work the way you want them to, better to make a slider
- // for the amount of revolutions or something, idk.
case 4:
return 1080.f + g_settings.rage.pitch_offset( );
case 5:
diff --git a/internal_rewrite/ragebot_resolver.cpp b/internal_rewrite/ragebot_resolver.cpp index 509b577..1b29305 100644 --- a/internal_rewrite/ragebot_resolver.cpp +++ b/internal_rewrite/ragebot_resolver.cpp @@ -90,8 +90,6 @@ namespace features return -1.f;
};
- float start_dmg = get_damage( local_pos, enemy_pos, g_ctx.m_local, ent );
-
auto trace_ent_pos = [ & ]( vec3_t start, vec3_t end, c_base_player* ent ) {
Ray_t ray;
CGameTrace tr;
@@ -108,9 +106,14 @@ namespace features return tr.endpos;
};
- auto test_dmg = [ & ]( float dist ) {
- vec3_t enemy_left = math::get_rotated_pos( enemy_pos, aim_angle.y - 90.f, dist );
- vec3_t enemy_right = math::get_rotated_pos( enemy_pos, aim_angle.y + 90.f, dist );
+ float local_dist = 75.f;
+ float enemy_dist = 75.f;
+
+ float start_dmg = get_damage( enemy_pos, local_pos, g_ctx.m_local, ent );
+
+ auto test_dmg = [ & ]( float dist, float enemy_dist, float delta = 50.f ) {
+ vec3_t enemy_left = math::get_rotated_pos( enemy_pos, aim_angle.y - 90.f, enemy_dist );
+ vec3_t enemy_right = math::get_rotated_pos( enemy_pos, aim_angle.y + 90.f, enemy_dist );
enemy_left = trace_ent_pos( enemy_pos, enemy_left, ent );
enemy_right = trace_ent_pos( enemy_pos, enemy_right, ent );
@@ -121,30 +124,53 @@ namespace features local_left = trace_ent_pos( local_pos, local_left, g_ctx.m_local );
local_right = trace_ent_pos( local_pos, local_right, g_ctx.m_local );
- float dmg_left = get_damage( local_left, enemy_left, ent, g_ctx.m_local )
- + get_damage( local_right, enemy_left, ent, g_ctx.m_local );
+ float dmg_left = get_damage( local_left, enemy_left, g_ctx.m_local, ent )
+ + get_damage( local_right, enemy_left, g_ctx.m_local, ent );
- float dmg_right = get_damage( local_left, enemy_right, ent, g_ctx.m_local )
- + get_damage( local_right, enemy_right, ent, g_ctx.m_local );
+ float dmg_right = get_damage( local_left, enemy_right, g_ctx.m_local, ent )
+ + get_damage( local_right, enemy_right, g_ctx.m_local, ent );
- if( std::abs( dmg_left - dmg_right ) < 25.f )
+ if( std::abs( dmg_left - dmg_right ) < delta )
return false;
float max_dmg = math::max( dmg_left, dmg_right );
ret_dir = dmg_left > dmg_right;
cur_damage = max_dmg;
- return max_dmg > 25.f;
+ return max_dmg > delta;
};
- float dist = ( ent->m_vecOrigin( ) - ent->get_hitbox_pos( 0 ) ).length2d( );
+ float radius = std::floorf( ( g_ctx.m_local->get_hitbox_pos( 0 ) - g_ctx.m_local->get_hitbox_pos( HITBOX_PELVIS ) ).length2d( ) );
+ radius = radius >= 15.f ? 20.f : 10.f;
+
+ float enemy_radius = std::floorf( ( ent->get_hitbox_pos( 0 ) - ent->get_hitbox_pos( HITBOX_PELVIS ) ).length2d( ) );
+ enemy_radius = enemy_radius >= 15.f ? 20.f : 10.f;
- if( !test_dmg( dist + 1.f ) ) {
+ if( !test_dmg( enemy_radius + 1.f, radius + 1.f, 25.f ) ) {
if( cur_damage < start_dmg * 2.f )
return -1;
}
- if( !test_dmg( 50.f ) )
+ bool found = false;
+
+ for( size_t i = 5; i > 0; --i ) {
+ float cur_dist = local_dist / i;
+ float cur_enemy_dist = enemy_dist / i;
+
+ if( cur_dist < radius )
+ continue;
+
+ if( cur_enemy_dist < enemy_radius )
+ continue;
+
+ if( test_dmg( cur_enemy_dist, cur_dist, 125.f / i ) ) {
+ found = true;
+ break;
+ } else if( cur_damage > 125.f / i )
+ break;
+ }
+
+ if( !found )
return -1;
return ret_dir;
@@ -180,6 +206,7 @@ namespace features m_was_invalid = false;
int freestanding = g_cheat.m_ragebot.m_resolver->try_freestanding( ent );
+
if( freestanding != -1 ) {
m_state = R_FREESTANDING;
}
diff --git a/internal_rewrite/ui.h b/internal_rewrite/ui.h index c763c74..f7c3fd7 100644 --- a/internal_rewrite/ui.h +++ b/internal_rewrite/ui.h @@ -446,13 +446,25 @@ namespace ui 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 )
);
+
+#ifndef _DEBUG
lby_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 7, 14, &g_settings.rage.fakewalk_ticks ) )->set_cond(
- [ ]( ) { return g_settings.rage.fakewalk; } );
+ [ ]( ) { return g_settings.rage.fakewalk; } );
+ }
+#else
+ 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; } );
}
+#endif
auto fakelag_form = std::make_shared< ui::c_form >( 0, 0, 215, 165, xors( "fakelag" ), 165 ); {
fakelag_form->add_item( std::make_shared< ui::c_dropdown< > >( 0, 0, 140, xors( "mode" ), &g_settings.rage.fakelag.mode, &dropdowns::fakelag_types ) );
+#ifndef _DEBUG
fakelag_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 2, 14, &g_settings.rage.fakelag.ticks ) );
+#else
+ fakelag_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 2, 16, &g_settings.rage.fakelag.ticks ) );
+#endif
fakelag_form->add_item( std::make_shared< ui::c_slider< int > >( 0, 0, 140, 0, 50, xors( "variance" ), &g_settings.rage.fakelag.fluctuate ) );
auto flags_form = fakelag_form->add_item( std::make_shared< ui::c_form >( 0, 5, 139, 0, xors( "flags" ), 0, true ) );
diff --git a/internal_rewrite/ui_draw.h b/internal_rewrite/ui_draw.h index 62a0068..d95b1c2 100644 --- a/internal_rewrite/ui_draw.h +++ b/internal_rewrite/ui_draw.h @@ -46,8 +46,8 @@ namespace ui float brightness = col_start.brightness( ) / 255.f;
float saturation = col_start.saturation( );
- float new_brightness = brightness > .5f ? brightness - 0.35f : brightness + 0.35f;
- float new_saturation = saturation > .5f ? saturation - 0.3f : saturation + 0.3f;
+ float new_brightness = brightness > .5f ? brightness - 0.2f : brightness + 0.2f;
+ float new_saturation = saturation > .5f ? saturation - 0.2f : saturation + 0.2f;
clr_t col_end = clr_t::from_hsb( col_start.hue( ), new_saturation, new_brightness );
col_end.a( ) = col_start.a( );
diff --git a/internal_rewrite/util.cpp b/internal_rewrite/util.cpp index a73133d..9e9751f 100644 --- a/internal_rewrite/util.cpp +++ b/internal_rewrite/util.cpp @@ -378,7 +378,7 @@ bool util::is_tick_valid( int tickcount ) { float delta = correct - ( g_ctx.pred_time( ) - TICKS_TO_TIME( tickcount ) );
if( g_settings.rage.enabled ) {
- return std::abs( delta ) < ( 0.2f - TICK_INTERVAL( ) * 2.f );
+ return delta > -0.2f + TICK_INTERVAL( ) * 2.f && delta < 0.2f;
}
return std::abs( delta ) < 0.2f;
diff --git a/internal_rewrite/visual_local.cpp b/internal_rewrite/visual_local.cpp index e77a128..dc311c0 100644 --- a/internal_rewrite/visual_local.cpp +++ b/internal_rewrite/visual_local.cpp @@ -110,19 +110,27 @@ namespace features }
}
+ bool onground = g_ctx.m_local->m_fFlags( ) & FL_ONGROUND;
+ bool air_lag = g_settings.rage.fakelag.in_air;
+ bool move_lag = g_settings.rage.fakelag.in_move;
+
+ bool should_lag = ( air_lag && !onground ) || ( move_lag && onground );
+
if( g_settings.rage.fakelag.mode( ) &&
g_settings.rage.fakelag.ticks( ) &&
- g_settings.rage.fakelag.in_air( ) ) {
+ should_lag ) {
int min_dist = 64;
int max_ticks = g_settings.rage.fakelag.ticks;
- if( g_settings.rage.fakelag.mode == 2 ) {
- max_ticks += max_ticks * g_settings.rage.fakelag.fluctuate * 0.01f;
- max_ticks = math::min( max_ticks, 15 );
- }
+ max_ticks += g_settings.rage.fakelag.fluctuate * max_ticks * 0.01f;
+#ifdef _DEBUG
+ max_ticks = std::min( max_ticks, 16 );
+#else
+ max_ticks = std::min( max_ticks, 14 );
+#endif
float speed = g_ctx.m_local->m_vecVelocity( ).length2d( );
- if( speed > 255.f && speed * g_csgo.m_globals->m_interval_per_tick * max_ticks > 50 ) {
- bool breaking = g_cheat.m_lagmgr.is_breaking_lc( );
+ bool breaking = g_cheat.m_lagmgr.is_breaking_lc( );
+ if( speed * g_csgo.m_globals->m_interval_per_tick * max_ticks > 55 && speed >= 245.f || breaking ) {
draw_really_big_string( 9, ( cur_pos += offset ), clr_t( 110, 110, 110, 255 ), xors( "LC" ) );
draw_really_big_string( 11, cur_pos + 2, clr_t( 0, 0, 0, 255 ), xors( "LC" ) );
draw_really_big_string( 10, cur_pos, breaking ? esp_green( ) : esp_red( ), xors( "LC" ) );
|
