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

C++ 2018 Foot-Yaw Resolver

Deleted member 86883

Hello guys, as many people dislike the foot-yaw desync stuff that is happening in 2018 csgo atm, i might aswell share this with everyone.

C++:
Expand Collapse Copy
// if so, move yaw = move yaw ideal, and we can calculate foot yaw by an accuracy of ~45 degrees
if( started_moving_this_frame && previous_record->layers[ 6 ].weight <= 0.f && !record->in_air( ) )
{
    const float local_cycle_increment = record->layers[ 6 ].playback_rate;
    float raw_yaw_ideal = atan2( -record->anim_velocity.y, -record->anim_velocity.x ) * 180.f /
        constants::pi;
    if( raw_yaw_ideal < 0.f )
        raw_yaw_ideal += 360.f;

    const int move_seq = record->layers[ 6 ].sequence;
    float move_yaw = FLT_MAX;
    constexpr std::array angles = { 180.f, 135.f, 90.f, 45.f, 0.f, -45.f, -90.f, -135.f };
    for( int i = animtag_startcycle_n; i <= animtag_startcycle_nw; i++ )
    {
        const float pred_cycle = player->animation_state( )->clamp_cycle(
            player->first_sequence_anim_tag( move_seq, i ) + local_cycle_increment );
        if( static_cast< int >( pred_cycle * 1000.f ) == static_cast< int >( record->layers[
            animation_layer_movement_move ].cycle * 1000.f ) )
        {
            move_yaw = angles[ i - animtag_startcycle_n ];
            break;
        }
    }

    if( move_yaw != FLT_MAX )
    {
        const float foot_yaw = g_math.angle_normalize( g_math.angle_diff( raw_yaw_ideal, move_yaw ) );
    }
}

For Reference:

This will only work if your velocity is somewhat accurate, and is not a perfect solution but does a good job at resolving most of the current desync stuff thats being used (including Moneybot's "Hidden")

If you are interested in 2018 development stuff, you can also join my discord server
 
Last edited by a moderator:

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