diff options
Diffstat (limited to 'internal_rewrite/update_clientside_animation.cpp')
| -rw-r--r-- | internal_rewrite/update_clientside_animation.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/internal_rewrite/update_clientside_animation.cpp b/internal_rewrite/update_clientside_animation.cpp index e05d6c2..009250b 100644 --- a/internal_rewrite/update_clientside_animation.cpp +++ b/internal_rewrite/update_clientside_animation.cpp @@ -43,11 +43,20 @@ void __fastcall hooks::update_clientside_animation( void* ecx_, void* edx_ ) { vec3_t real_angle = g_ctx.m_thirdperson_angle;
- float min_pitch = 10.0f;
+ float pitch;
if( g_ctx.m_local->get_animstate( )->m_bInHitGroundAnimation && ( g_ctx.m_local->m_fFlags( ) & FL_ONGROUND ) ) {
- if( real_angle.x > min_pitch ) {
- real_angle.x = -min_pitch;
+ bool dist = g_settings.rage.enabled( ) && g_settings.rage.selection_type( ) == 1;
+ int target = util::get_closest_player( dist );
+
+ if( target != -1 ) {
+ auto t = g_csgo.m_entlist( )->GetClientEntity( target );
+
+ pitch = math::vector_angles( ent->m_vecOrigin( ), t->m_vecOrigin( ) ).x;
}
+ else
+ pitch = -10.f;
+
+ real_angle.x = pitch;
}
g_csgo.m_prediction( )->SetViewAngles( real_angle );
|
