Welcome to hackvshack.net Forum!
Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, and More!
Register

C++ Reversed local animation fix from onetap.pasta v4

potroshitel

Master HvHer
User ID:
63477
Messages:
15
Reactions:
848
Badges:
8
REP:
−0/1+
Level:
87
[REACT=1, 2, 4]
C++:
Expand Collapse Copy
const auto anim_state = g_local_player->self( )->anim_state( );

for ( auto& data : m_anim_data ) {
    valve::g_global_vars->set( data.m_sim_time, valve::to_ticks( data.m_sim_time ) [ ] ( ) -> void {
        /* deadflag + 0x4u */
        g_local_player->self( )->render_angles( ).x( ) = data.m_view_angles.x( );
        g_local_player->self( )->render_angles( ).y( ) = data.m_view_angles.y( );
        g_local_player->self( )->render_angles( ).z( ) = 0.f;
      
        g_local_player->self( )->duck_amount( ) = data.m_duck_amount;
      
        anim_state->m_last_anim_frame = valve::g_global_vars->m_frame_count - 1;
      
        if ( g_local_player->self( )->velocity( ).length( ) < 0.1f ) {
            g_local_player->self( )->velocity( ) = {};
          
            g_local_player->self( )->set_abs_velocity( {} );
        }
      
        /* compute_strafing( ) */
      
        g_local_player->self( )->lby( ) = data.m_lby;
      
        g_local_player->self( )->third_person_recoil( ) = g_local_player->self( )->aim_punch_angle( ).x( ) * 2.f;
      
        g_local_player->self( )->anim_layers( ).at( valve::e_anim_layers::alive_loop ).m_weight =
            1.f - std::clamp( std::clamp( g_local_player->self( )->velocity( ).length_2d( ) / g_local_player->self( )->max_speed( ), 0.f, 1.f ) - 0.55f ) / 0.35f;
      
        if ( g_local_player->spawn_time( ) == m_prev_spawn_time
           && !( g_local_player->flags( ) & valve::e_ent_flags::frozen ) ) {
            anim_state->m_feet_cycle = m_prev_feet_cycle;
            anim_state->m_feet_weight = m_prev_feet_weight;
        }
      
        g_local_player->self( )->client_side_animation( ) = true;
        g_local_player->self( )->update_client_side_animation( );
        g_local_player->self( )->client_side_animation( ) = false;
      
        m_prev_spawn_time = g_local_player->spawn_time( );
      
        m_prev_feet_cycle = anim_state->m_feet_cycle;
        m_prev_feet_weight = anim_state->m_feet_weight;
      
        /* do anim_events( ) */
    } );
  
    /* lby timer etc same as in game */
}
[/REACT]
 

Who has read this thread (Total: 0) in last 1 hours View details