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

Tutorial properly resolving desync after clampbonesinbbox update for newbies

iliiakalamec

Godlike HvHer
User ID:
64597
Messages:
1,077
Reactions:
9,417
Badges:
22
REP:
−52/7+
Level:
475
get good animfix (fatality/purplehack/oversee if ur a jew), good lagcomp (do urself i use rebuilded supremacy's)
then u need to simulate layers and divide into states
eh:
Expand Collapse Copy
layers[6].m_flWeight = 0.0f // standing
layers[6].m_flWeight > 0.0f // moving
layers[3].m_flWeight < 0.1f // opposite lby

main goshing will be on stand.
on-move weight and playbackrate is only usable things
one degree of desync for 6th animlayer weight is roughly 0.0050, weight gives you specific value and playbackrate gives side
playbackrate computing:
Expand Collapse Copy
float resolver::calculate_expected_playback_rate(float yaw_direction)
{
    if (!player)
        return 0.0f;

    Vector velocity = player->m_vecVelocity();
    float velocity_magnitude = velocity.Length();

    // if speed is less than 1, player is standing (you should check via 6th layer weight)
    if (velocity_magnitude < 1.0f)
        return 0.0f;

    // computing move yaw
    float velocity_yaw = 0.0f;
    if (fabs(velocity.x) > 0.001f || fabs(velocity.y) > 0.001f)
    {
        velocity_yaw = atan2(velocity.y, velocity.x) * (180.0f / 3.14159265f);
    }

    // normalizing diff
    float yaw_diff = velocity_yaw - yaw_direction;

    // normalizing into 180/-180
    while (yaw_diff > 180.0f) yaw_diff -= 360.0f;
    while (yaw_diff < -180.0f) yaw_diff += 360.0f;

    // playbackrate is dependent of diff between moveyaw and current yaw
    float expected_pbr = yaw_diff / 180.0f;

    return expected_pbr;
}

lby break resolver from my paste:
Expand Collapse Copy
void resolver::resolve_lby_break()
{
    if (!player_record)
        return;

    if (6 >= 15 || 6 < 0 || 3 >= 15 || 3 < 0)
        return;

    // lby opposite works only on stand
    if (player_record->layers[6].m_flCycle > 0.1f)
        return;

    // getting 3rd layer weight cycle
    float layer3_weight = player_record->layers[3].m_flWeight;
    float layer3_cycle = player_record->layers[3].m_flCycle;

    // both are less than 0.1f? invert
    if (layer3_weight < 0.1f && layer3_cycle < 0.1f)
    {
        player_record->type = LBY;
        original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw + 180.0f);
    }
}

lby break resolver pseudocode by potroshitel:
Expand Collapse Copy
data->m_extending = record->m_layers[ 3 ].m_weight == 0.0f && record->m_layers[ 3 ].m_cycle == 0.0f;

if ( data->m_extending )
{
  if ( delta > 35.0f )
  {
    data->m_anim_side = 1; // +60
    data->m_anim_type = 1;
  }
  else if ( delta < -35.0f )
  {
    data->m_anim_side = 2; // -60
    data->m_anim_type = 1;
  }
}

standing resolver (wrong):
Expand Collapse Copy
void resolver::resolve_antifreestanding()
{
    if (!player_record)
        return;

    float wall_yaw = get_nearest_wall_yaw();

    if (fabs(wall_yaw - original_goal_feet_yaw) < 90.0f)
    {
        player_record->type = DIRECTIONAL;

        float side_angle = (wall_yaw > original_goal_feet_yaw) ? 60.0f : -60.0f;
        original_goal_feet_yaw = math::normalize_yaw(wall_yaw + side_angle);

        last_awall_yaw = original_goal_feet_yaw;
        player_record->side = RESOLVER_FIRST;
    }
    else
    {
        player_record->type = BRUTEFORCE;

        switch (last_side)
        {
        case RESOLVER_ORIGINAL:
            original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw - 60.0f);
            player_record->side = RESOLVER_ZERO;
            break;
        case RESOLVER_ZERO:
            original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw + 60.0f);
            player_record->side = RESOLVER_FIRST;
            break;
        case RESOLVER_FIRST:
            original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw + 60.0f);
            player_record->side = RESOLVER_SECOND;
            break;
        default:
            player_record->side = RESOLVER_ORIGINAL;
            break;
        }
    }
}

as melio said "Just simulate left , right and center matrix lol easiest resolving teq"
yeah, this can work, but if u want easiest resolver teq = force safepoints
and about jitter prediction
Code:
Expand Collapse Copy
its okay if you dont understand simple logic, skeet did it since 2021.
this is wrong and the reason why gamesense misses jitters more than neverlose does.
dont gosh with patterns do ur reso

updated 26jul
 
Last edited:
  • Haha
Reactions: DrippyHvH
first of all, get good animation fix. From open source hacks id recommend fatality (click) or arctictech (find urself)
then get good safepoint system, id recommend fatality for that (yup another time)
after that, what you want to do if u dont want with to gosh with simulating layers:

what you want to do if u can gosh with simulating layers:

also some coders use "jitter prediction" which is WRONG and useless. dont make your resolver "pattern based", try to make it always active or js safepoint lol
mostly just look at fatality and other cheats like evolve or idk pandora or other cheats that had their source free so yeah and for other stuff use public sources that are available
 
  • Nooo
Reactions: DrippyHvH
velocity <40
amazing magic number hahaha
game never uses 40 as a threshold anywhere btw
diff eyeangles.y and lowerbodyyawtarget
yes go ahead and use desynced client values to resolver server yaw
and if aimyaw isnt 0 = diff + (180 - diff) is your resolved value, velocity only <1
HAHAHAHAA
id recommend fatality
actually no need to read any further, OP is clearly clueless.
also some coders use "jitter prediction" which is WRONG and useless
its okay if you dont understand simple logic, skeet did it since 2021.
also hf with your "safepoints" when your lby and eyeangles are not lagcompensated LAFF
i suggest you learn source engine before making posts about it
 
  • Love
Reactions: cacaomelio
get good animfix (fatality/purplehack/oversee if ur a jew), good lagcomp (do urself i use rebuilded supremacy's)
then u need to simulate layers and divide into states
eh:
Expand Collapse Copy
layers[6].m_flWeight = 0.0f // standing
layers[6].m_flWeight > 0.0f // moving
layers[3].m_flWeight < 0.1f // opposite lby

main goshing will be on stand.
on-move weight and playbackrate is only usable things
one degree of desync for 6th animlayer weight is roughly 0.0050, weight gives you specific value and playbackrate gives side
playbackrate computing:
Expand Collapse Copy
float resolver::calculate_expected_playback_rate(float yaw_direction)
{
    if (!player)
        return 0.0f;

    Vector velocity = player->m_vecVelocity();
    float velocity_magnitude = velocity.Length();

    // if speed is less than 1, player is standing (you should check via 6th layer weight)
    if (velocity_magnitude < 1.0f)
        return 0.0f;

    // computing move yaw
    float velocity_yaw = 0.0f;
    if (fabs(velocity.x) > 0.001f || fabs(velocity.y) > 0.001f)
    {
        velocity_yaw = atan2(velocity.y, velocity.x) * (180.0f / 3.14159265f);
    }

    // normalizing diff
    float yaw_diff = velocity_yaw - yaw_direction;

    // normalizing into 180/-180
    while (yaw_diff > 180.0f) yaw_diff -= 360.0f;
    while (yaw_diff < -180.0f) yaw_diff += 360.0f;

    // playbackrate is dependent of diff between moveyaw and current yaw
    float expected_pbr = yaw_diff / 180.0f;

    return expected_pbr;
}

lby break resolver from my paste:
Expand Collapse Copy
void resolver::resolve_lby_break()
{
    if (!player_record)
        return;

    if (6 >= 15 || 6 < 0 || 3 >= 15 || 3 < 0)
        return;

    // lby opposite works only on stand
    if (player_record->layers[6].m_flCycle > 0.1f)
        return;

    // getting 3rd layer weight cycle
    float layer3_weight = player_record->layers[3].m_flWeight;
    float layer3_cycle = player_record->layers[3].m_flCycle;

    // both are less than 0.1f? invert
    if (layer3_weight < 0.1f && layer3_cycle < 0.1f)
    {
        player_record->type = LBY;
        original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw + 180.0f);
    }
}

lby break resolver pseudocode by potroshitel:
Expand Collapse Copy
data->m_extending = record->m_layers[ 3 ].m_weight == 0.0f && record->m_layers[ 3 ].m_cycle == 0.0f;

if ( data->m_extending )
{
  if ( delta > 35.0f )
  {
    data->m_anim_side = 1; // +60
    data->m_anim_type = 1;
  }
  else if ( delta < -35.0f )
  {
    data->m_anim_side = 2; // -60
    data->m_anim_type = 1;
  }
}

standing resolver (wrong):
Expand Collapse Copy
void resolver::resolve_antifreestanding()
{
    if (!player_record)
        return;

    float wall_yaw = get_nearest_wall_yaw();

    if (fabs(wall_yaw - original_goal_feet_yaw) < 90.0f)
    {
        player_record->type = DIRECTIONAL;

        float side_angle = (wall_yaw > original_goal_feet_yaw) ? 60.0f : -60.0f;
        original_goal_feet_yaw = math::normalize_yaw(wall_yaw + side_angle);

        last_awall_yaw = original_goal_feet_yaw;
        player_record->side = RESOLVER_FIRST;
    }
    else
    {
        player_record->type = BRUTEFORCE;

        switch (last_side)
        {
        case RESOLVER_ORIGINAL:
            original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw - 60.0f);
            player_record->side = RESOLVER_ZERO;
            break;
        case RESOLVER_ZERO:
            original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw + 60.0f);
            player_record->side = RESOLVER_FIRST;
            break;
        case RESOLVER_FIRST:
            original_goal_feet_yaw = math::normalize_yaw(original_goal_feet_yaw + 60.0f);
            player_record->side = RESOLVER_SECOND;
            break;
        default:
            player_record->side = RESOLVER_ORIGINAL;
            break;
        }
    }
}

as melio said "Just simulate left , right and center matrix lol easiest resolving teq"
yeah, this can work, but if u want easiest resolver teq = force safepoints
and about jitter prediction
Code:
Expand Collapse Copy
its okay if you dont understand simple logic, skeet did it since 2021.
this is wrong and the reason why gamesense misses jitters more than neverlose does.
dont gosh with patterns do ur reso

updated 26jul
Still shit tutorial ur a clueless paster
 
  • Like
Reactions: DrippyHvH
eh:
Expand Collapse Copy
layers[6].m_flWeight = 0.0f // standing
layers[6].m_flWeight > 0.0f // moving
layers[3].m_flWeight < 0.1f // opposite lby
again complete meme.
playbackrate computing:
Expand Collapse Copy
float resolver::calculate_expected_playback_rate(float yaw_direction)
{
   ...
    return expected_pbr;
}
HAHHAHHAH this guy is just posting AI generated code but cant give the AI SetupMovement hahaha
spoonfeed:
ACTUAL sv code:
Expand Collapse Copy
void CCSGOPlayerAnimState::SetUpMovement(void)
{
    float flMoveWeightWithAirSmooth = m_flMoveWeight * m_flInAirSmoothValue;
    
    float v43 = 0.0f;
    if (pLayer)
        v43 = pLayer->m_flWeight;
    
    float v44 = 1.0f - v43;
    float v45 = 0.55f;
    if (v44 > 0.55f)
    {
        CAnimationLayer *pLayerInner = m_pPlayer->GetAnimOverlay(ANIMATION_LAYER_MOVEMENT_LAND_OR_CLIMB, USE_ANIMLAYER_RAW_INDEX);
        float v48 = 0.0f;
        if (pLayerInner)
            v48 = pLayerInner->m_flWeight;
        v45 = 1.0f - v48;
    }
    
    float v51 = v45 * flMoveWeightWithAirSmooth;
    
    float v63;
    if (v51 >= 0.0f)
        v63 = fminf(v51, 1.0f);
    else
        v63 = 0.0f;
    // v63 is playbackrate
}

lby break resolver from my paste:
Expand Collapse Copy
void resolver::resolve_lby_break()
{

    if (6 >= 15 || 6 < 0 || 3 >= 15 || 3 < 0)
        return;

}

HAHAHAHAH do i even have to say anything? idk why this forum still allows obvious troll posts. this thread is literally 100% useles.
/del
 

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