diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-07 00:33:45 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-07 00:33:45 +0200 |
| commit | f3e05f066a09546f55ad3b59471a5a39a0ce4243 (patch) | |
| tree | 2e4c224dde0530de7c3376bb7cd68bf8a702a986 | |
| parent | b8f43120600120bdfc22abfc1f94d3f77cb25640 (diff) | |
dsadsad
| -rw-r--r-- | internal_rewrite/c_base_player.cpp | 7 | ||||
| -rw-r--r-- | internal_rewrite/ragebot.cpp | 2 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_antiaim.cpp | 5 | ||||
| -rw-r--r-- | internal_rewrite/ragebot_resolver.cpp | 13 | ||||
| -rw-r--r-- | internal_rewrite/update_clientside_animation.cpp | 11 |
5 files changed, 16 insertions, 22 deletions
diff --git a/internal_rewrite/c_base_player.cpp b/internal_rewrite/c_base_player.cpp index c1b8162..0d1edb5 100644 --- a/internal_rewrite/c_base_player.cpp +++ b/internal_rewrite/c_base_player.cpp @@ -741,7 +741,7 @@ void c_base_player::calc_anim_velocity( bool reset ) { if( anim_vel.length2d( ) < 1.f )
anim_vel = vec3_t( );
- int ticks = ( int )( 0.5f + TICK_INTERVAL( ) / delta );
+ int ticks = TIME_TO_TICKS( delta * .5f );
vec3_t est_tick_vel = math::lerp( last_velocity, velocity, .5f );
for( int i{ }; i < ticks; i++ ) {
if( est_tick_vel.length2d( ) < 1.f )
@@ -751,7 +751,7 @@ void c_base_player::calc_anim_velocity( bool reset ) { }
//assume fakewalk
- if( velocity.length2d( ) >= last_velocity.length2d( ) && est_tick_vel.length2d( ) < 5.f )
+ if( velocity.length2d( ) >= last_velocity.length2d( ) && est_tick_vel.length2d( ) < 5.f && delta > TICK_INTERVAL( ) )
anim_vel = vec3_t( );
else if( anim_vel.length2d( ) >= 0.1f && velocity.length2d( ) > last_velocity.length2d( ) ) {
@@ -926,8 +926,7 @@ void c_base_player::fix_animations( bool reset, bool resolver_change ) { auto activity = get_seq_activity( m_AnimOverlay( ).GetElements( )[ 3 ].m_nSequence );
if( activity == 979 ) {
- float cycle = m_AnimOverlay( ).GetElements( )[ 3 ].m_flCycle;
- m_AnimOverlay( ).GetElements( )[ 3 ].m_flCycle = cycle > 0.5f ? 1.f : 0.f;
+ m_AnimOverlay( ).GetElements( )[ 3 ].m_flCycle = 0.f;
}
}
diff --git a/internal_rewrite/ragebot.cpp b/internal_rewrite/ragebot.cpp index 7f844b0..a5d2762 100644 --- a/internal_rewrite/ragebot.cpp +++ b/internal_rewrite/ragebot.cpp @@ -613,7 +613,7 @@ namespace features if( ideal_ent && dist < 80.f ) {
int attack = 0;
- if( dist < 70.f )
+ if( dist < 65.f )
attack = IN_ATTACK2;
else if( hp < 35 )
attack = IN_ATTACK;
diff --git a/internal_rewrite/ragebot_antiaim.cpp b/internal_rewrite/ragebot_antiaim.cpp index 8ace9a1..7db3e6e 100644 --- a/internal_rewrite/ragebot_antiaim.cpp +++ b/internal_rewrite/ragebot_antiaim.cpp @@ -172,10 +172,9 @@ namespace features }
if( std::abs( offset ) < 105 ) {
- int min_tick = g_cheat.m_ragebot.m_antiaim->is_fakewalking( ) ? g_settings.rage.fakewalk_ticks( ) + 1 : 3;
- if( update_ticks < min_tick && update_ticks >= 2 ) {
+ int min_tick = g_cheat.m_ragebot.m_antiaim->is_fakewalking( ) ? g_settings.rage.fakewalk_ticks( ) + 1 : 4;
+ if( update_ticks < min_tick && update_ticks > 2 ) {
*angles = break_angle + ( offset < 0 ? 105 : -105 );
- //g_ctx.m_thirdperson_angle.y = *angles;
return;
}
}
diff --git a/internal_rewrite/ragebot_resolver.cpp b/internal_rewrite/ragebot_resolver.cpp index a56a00c..0a7174e 100644 --- a/internal_rewrite/ragebot_resolver.cpp +++ b/internal_rewrite/ragebot_resolver.cpp @@ -29,12 +29,11 @@ namespace features static const std::vector< float > possible_angles_adjust = {
FLT_ANG_FREESTANDING,
FLT_ANG_MOVING_LBY_UP,
- FLT_ANG_180,
- FLT_ANG_90,
- FLT_ANG_MINUS_90,
+ FLT_ANG_180,
FLT_ANG_135,
FLT_ANG_MINUS_135,
- //180.f,
+ 110.f,
+ -70.f
};
bool dbg_resolver( ) {
@@ -304,10 +303,10 @@ namespace features vec3_t offset = position - origin;
float radius = offset.length2d( );
- float cos_ = offset.x / radius;
+ float cosine = offset.x / radius;
- float deg = RAD2DEG( acos( cos_ ) );
- if( offset.y < 0 ) deg = -deg;
+ float deg = RAD2DEG( acos( cosine ) );
+ if( offset.y < 0 ) deg += 360.f;
float rot = ( deg - 180.f ) * ( M_PI / 180.f );
rotated_center.x = origin.x + cos( rot ) * radius;
diff --git a/internal_rewrite/update_clientside_animation.cpp b/internal_rewrite/update_clientside_animation.cpp index 46f92fa..cf1db8b 100644 --- a/internal_rewrite/update_clientside_animation.cpp +++ b/internal_rewrite/update_clientside_animation.cpp @@ -88,7 +88,7 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { float lerp_progress = ( last_update + lerp - g_csgo.m_globals->m_curtime ) / lerp;
float lerp_yaw = 0.f;
- if( !first_update && ( ent->get_animstate( )->m_velocity > 0.1f || std::abs( last_yaw - ent->get_animstate( )->m_flGoalFeetYaw ) < 35.f ) ) {
+ if( !first_update && ( ent->get_animstate( )->m_velocity > 0.1f || std::abs( last_yaw - ent->get_animstate( )->m_flGoalFeetYaw ) < 35.f ) && update_delta <= TICK_INTERVAL( ) * 2.f ) {
float yaw = ent->get_animstate( )->m_flGoalFeetYaw;
if( yaw < 0.f )
yaw += 360.f;
@@ -96,8 +96,7 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { if( std::abs( yaw - last_yaw ) >= 180.f )
lerp_yaw = yaw;
else {
- float jmp_yaw = math::lerp( prev_anims.m_last_simtime, yaw, update_lerp / update_delta );
- lerp_yaw = math::lerp( yaw, jmp_yaw, std::clamp( lerp_progress, 0.f, 1.f ) );
+ lerp_yaw = math::lerp( yaw, last_yaw, std::clamp( lerp_progress, 0.f, 1.f ) );
}
}
else {
@@ -116,8 +115,7 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { if( !isfinite( old_param ) || !isfinite( param ) )
continue;
- float jmp_param = math::lerp( old_param, param, update_lerp / update_delta );
- float final_param = math::lerp( param, jmp_param, std::clamp( lerp_progress, 0.f, 1.f ) );
+ float final_param = math::lerp( param, old_param, std::clamp( lerp_progress, 0.f, 1.f ) );
ent->m_flPoseParameter( )[ i ] = final_param;
}
@@ -130,8 +128,7 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { cycle += 1.f;
}
- float jmp_cycle = math::lerp( old_cycle, cycle, update_lerp / update_delta );
- float final_cycle = math::lerp( cycle, jmp_cycle, std::clamp( lerp_progress, 0.f, 1.f ) );
+ float final_cycle = math::lerp( cycle, old_cycle, std::clamp( lerp_progress, 0.f, 1.f ) );
if( final_cycle > 1.f )
final_cycle -= 1.f;
|
