What's new

Welcome to HvH Forum!

SignUp Now! Download Free HvH CS2/CS:GO Cheats, CFG, LUA/JS Scripts, And More!


SignUp Now!

Source Code 2018 Foot-Yaw Resolver

Rookie HvHer
User ID
86883
Messages
2
Reactions
5
Level
4
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++:
// 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:
Rookie HvHer
User ID
66737
Messages
61
Reactions
17
Level
9
make it sup paste ready so i can just paste it in thanks
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Top