Исходник Onetap.com animlayers resolver

Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
81
Реакции[?]
96
Поинты[?]
0
original post
https://yougame.biz/threads/154791/

this is not fully reversed and some stuff may be wrong or may not be included from the original post psudo code


lets see who is gonna past this into weave or supremacy XD
C++:
void onetap_animlayerresolver(C_CSPlayer* player, CLagrecord* m_nResolverData, CLagrecord* previous)
{
    signed int v30; // esi
    int v31; // eax
    float* v32; // esi
    int v33; // eax
    float m_angRotation.y; // xmm6_4
    float v35; // xmm5_4
    int v36; // edx
    int v37; // ecx
    __m128 v38; // xmm0
    float m_flAbsYaw; // xmm6_4
    __m128 v40; // xmm0
    float v41; // xmm5_4
    __m128 v42; // xmm0
    double m_nSpeed; // xmm0_8
    float DeltaFirst; // xmm3_4
    float DeltaSecond; // xmm2_4
    float DeltaThird; // xmm1_4
    float m_vec_angles.y; // xmm0_4
    __m128 m_Delta; // xmm0
    float v49; // [esp+Ch] [ebp-4Ch]
    float v50; // [esp+10h] [ebp-48h]
    int v51; // [esp+14h] [ebp-44h]
    float v52; // [esp+18h] [ebp-40h]
    char v53[12]; // [esp+1Ch] [ebp-3Ch]
    float v54; // [esp+28h] [ebp-30h]
    float v55; // [esp+34h] [ebp-24h]
    float v56; // [esp+38h] [ebp-20h]
    float v57; // [esp+3Ch] [ebp-1Ch]
    float v58; // [esp+40h] [ebp-18h]
    float v60; // [esp+48h] [ebp-10h]
    char v61; // [esp+4Ch] [ebp-Ch]
    float v62; // [esp+50h] [ebp-8h]

    if (m_nResolverData)
        m_nResolverData->ResolvingWay = 0; // set ResolvingWay to 0

    float m_istate = player->get_animstate();
    float m_flbruteangle = g_cmd->viewangles.y;

    if (m_istate && m_nResolverData && a3 && m_istate->gap0[3060])
    {
        Math::AngleDifference(g_cmd->viewangles.y, m_istate->m_flGoalFeetYaw);
        float v7 = Math::AngleDifference(m_flbruteangle, m_istate->m_flGoalFeetYaw);
        v8 = v7 > 0.1;
        if (v6)
            v9 = v6 == v8;
        else
            v9 = v7 <= 0.1;
        if (!v9)
        {
            m_nResolverData->byte34C = 1;
            m_nResolverData->dword350 = 2 * v8 - 1;
        }
        if (m_istate->gap0[28] == off_3FEBE5A8[1234])
        {
            // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw and est there desync

            Vector velocity = m_nResolverData->m_vecVelocity_y;
            float spd = velocity.LengthSqr();
            if (spd > std::powf(1.2f * 260.0f, 2.f)) {
                Vector velocity_normalized = velocity.Normalized();
                velocity = velocity_normalized * (1.2f * 260.0f);
            }

            float v25 = std::clamp(m_nResolverData->get_duck_amt() + m_nResolverData->get_anim_state()->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
            float v26 = m_nResolverData->get_animstate()->m_fDuckAmount;
            float v27 = m_nResolverData->get_animstate()->m_flLastClientSideAnimationUpdateTime * 6.0f;
            float v28;

            // clamp
            if ((v25 - v26) <= v27) {
                if (-v27 <= (v25 - v26))
                    v28 = v25;
                else
                    v28 = v26 - v27;
            }
            else {
                v28 = v26 + v27;
            }

            float flDuckAmount = std::clamp(v28, 0.0f, 1.0f);

            Vector animationVelocity = GetSmoothedVelocity(m_nResolverData->get_animstate()->m_flLastClientSideAnimationUpdateTime * 2000.0f, velocity, player->get_velocity());
            float speed = std::fminf(animationVelocity.Length(), 260.0f);

            auto weapon = get_weapon(m_nResolverData->get_active_weapon());

            float flMaxMovementSpeed = 260.0f;
            if (weapon) {
                flMaxMovementSpeed = std::fmaxf(weapon->get_wpn_data_safe()->flMaxSpeed, 0.001f);
            }

            float m_flGroundFraction = *(float*)(m_nResolverData->get_anim_state() + 0x11C);

            float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
            float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

            flRunningSpeed = std::clamp(flRunningSpeed, 0.0f, 1.0f);

            float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
            if (flDuckAmount > 0.0f) {
                float flDuckingSpeed = std::clamp(flDuckingSpeed, 0.0f, 1.0f);
                flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
            }

            m_flMinBodyYaw = flYawModifier * std::fabsf(((float)(uintptr_t(m_nResolverData->get_animstate()) + 0x330)));
            m_flMaxBodyYaw = flYawModifier * std::fabsf(((float)(uintptr_t(m_nResolverData->get_animstate()) + 0x334)));

        }
        if (m_nResolverData->m_iFlags & 1 && v5->m_fFlags[0x24] & 1 && !m_nResolverData->GetFlags && !state->byteC0C)
        {
            m_nSpeed = (m_nResolverData->m_vecVelocity_y * m_nResolverData->m_vecVelocity_y) + (m_nResolverData->m_vecVelocity_z * m_nResolverData->m_vecVelocity_z);
            if (m_nSpeed <= 0.1)
            {
                if (m_nResolverData->server_anim_layers[3] == 0.0
                    && m_nResolverData->server_anim_layers[3] == 0.0
                    && m_nResolverData->server_anim_layers[3] == 0.0)
                {
                    m_vec_angles.y = m_nResolverData->m_nResolvedEyeAngles_y;
                    m_nResolverData->ResolvingWay = 1;
                    m_Delta = Math::AngleDifference(m_vec_angles.y, state->m_flGoalFeetYaw);
                    m_nResolverData->ResolvingMethod = 2 * (m_Delta.clamp[0] <= 0.0) - 1;
                }
            }
            else if (!(m_nResolverData->server_anim_layers[12] * 1000.0) && (m_nResolverData->server_anim_layers[6].m_flWeight * 1000.f) == (previous.anim_layers[6].m_flWeight * 1000.f))
            {
                float DeltaFirst = abs(m_nResolverData->server_anim_layers[6].m_flPlaybackRate - m_nResolverData->resolver_anim_layers[0][6].m_flPlaybackRate);
                float DeltaSecond = abs(m_nResolverData->server_anim_layers[6].m_flPlaybackRate - m_nResolverData->resolver_anim_layers[1][6].m_flPlaybackRate);
                float DeltaThird = abs(m_nResolverData->server_anim_layers[6].m_flPlaybackRate - m_nResolverData->resolver_anim_layers[2][6].m_flPlaybackRate);

                if (DeltaFirst < DeltaSecond || DeltaThird <= DeltaSecond || (DeltaSecond * 1000.0))
                {
                    if (DeltaFirst >= DeltaThird && DeltaSecond > DeltaThird && !(DeltaThird * 1000.0))
                    {
                        m_nResolverData->ResolvingWay = 1;
                        m_nResolverData->ResolvingMethod = 1;
                    }
                }
                else
                {
                    m_nResolverData->ResolvingWay = 1;
                    m_nResolverData->ResolvingMethod = -1;
                }
            }
        }
    }
    // i just added this part here for example u should do some kind of resolver streangth to
    m_flbruteangle = (m_nResolverData->ResolvingMethod > 0.f) ? +m_flEstimatedMaxDesync : -m_flEstimatedMaxDesync;

    player->get_animstate()->m_flGoalFeetYaw = m_flbruteangle;

}
 
Последнее редактирование:
Нефор
Забаненный
Статус
Оффлайн
Регистрация
9 Ноя 2018
Сообщения
1,042
Реакции[?]
663
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
original post
https://yougame.biz/threads/154791/

this is not fully reversed and some stuff may be wrong or may not be included from the original post psudo code


lets see who is gonna past this into weave or supremacy XD
C++:
void onetap_animlayerresolver(C_CSPlayer* player, CLagrecord* m_nResolverData, CLagrecord* previous)
{

    m_flbruteangle = (m_nResolverData->ResolvingMethod > 0.f) ? +m_flEstimatedMaxDesync : -m_flEstimatedMaxDesync;

    player->get_animstate()->m_flGoalFeetYaw = m_flbruteangle;

}
ну если что правильнее будет, animstate->m_goalfeet_yaw = angle_normalize(eye_angles.y + 58.f * resolving_method)
 
Забаненный
Статус
Оффлайн
Регистрация
22 Июл 2020
Сообщения
112
Реакции[?]
105
Поинты[?]
1K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
already public, gj repfarming semi reversed code
 
When it hit it hit.
Забаненный
Статус
Оффлайн
Регистрация
2 Апр 2019
Сообщения
131
Реакции[?]
66
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
original post
https://yougame.biz/threads/154791/

this is not fully reversed and some stuff may be wrong or may not be included from the original post psudo code


lets see who is gonna past this into weave or supremacy XD
C++:
void onetap_animlayerresolver(C_CSPlayer* player, CLagrecord* m_nResolverData, CLagrecord* previous)
{
    signed int v30; // esi
    int v31; // eax
    float* v32; // esi
    int v33; // eax
    float m_angRotation.y; // xmm6_4
    float v35; // xmm5_4
    int v36; // edx
    int v37; // ecx
    __m128 v38; // xmm0
    float m_flAbsYaw; // xmm6_4
    __m128 v40; // xmm0
    float v41; // xmm5_4
    __m128 v42; // xmm0
    double m_nSpeed; // xmm0_8
    float DeltaFirst; // xmm3_4
    float DeltaSecond; // xmm2_4
    float DeltaThird; // xmm1_4
    float m_vec_angles.y; // xmm0_4
    __m128 m_Delta; // xmm0
    float v49; // [esp+Ch] [ebp-4Ch]
    float v50; // [esp+10h] [ebp-48h]
    int v51; // [esp+14h] [ebp-44h]
    float v52; // [esp+18h] [ebp-40h]
    char v53[12]; // [esp+1Ch] [ebp-3Ch]
    float v54; // [esp+28h] [ebp-30h]
    float v55; // [esp+34h] [ebp-24h]
    float v56; // [esp+38h] [ebp-20h]
    float v57; // [esp+3Ch] [ebp-1Ch]
    float v58; // [esp+40h] [ebp-18h]
    float v60; // [esp+48h] [ebp-10h]
    char v61; // [esp+4Ch] [ebp-Ch]
    float v62; // [esp+50h] [ebp-8h]

    if (m_nResolverData)
        m_nResolverData->ResolvingWay = 0; // set ResolvingWay to 0

    float m_istate = player->get_animstate();
    float m_flbruteangle = g_cmd->viewangles.y;

    if (m_istate && m_nResolverData && a3 && m_istate->gap0[3060])
    {
        Math::AngleDifference(g_cmd->viewangles.y, m_istate->m_flGoalFeetYaw);
        float v7 = Math::AngleDifference(m_flbruteangle, m_istate->m_flGoalFeetYaw);
        v8 = v7 > 0.1;
        if (v6)
            v9 = v6 == v8;
        else
            v9 = v7 <= 0.1;
        if (!v9)
        {
            m_nResolverData->byte34C = 1;
            m_nResolverData->dword350 = 2 * v8 - 1;
        }
        if (m_istate->gap0[28] == off_3FEBE5A8[1234])
        {
            // Rebuild setup velocity to receive flMinBodyYaw and flMaxBodyYaw and est there desync

            Vector velocity = m_nResolverData->m_vecVelocity_y;
            float spd = velocity.LengthSqr();
            if (spd > std::powf(1.2f * 260.0f, 2.f)) {
                Vector velocity_normalized = velocity.Normalized();
                velocity = velocity_normalized * (1.2f * 260.0f);
            }

            float v25 = std::clamp(m_nResolverData->get_duck_amt() + m_nResolverData->get_anim_state()->m_fLandingDuckAdditiveSomething, 0.0f, 1.0f);
            float v26 = m_nResolverData->get_animstate()->m_fDuckAmount;
            float v27 = m_nResolverData->get_animstate()->m_flLastClientSideAnimationUpdateTime * 6.0f;
            float v28;

            // clamp
            if ((v25 - v26) <= v27) {
                if (-v27 <= (v25 - v26))
                    v28 = v25;
                else
                    v28 = v26 - v27;
            }
            else {
                v28 = v26 + v27;
            }

            float flDuckAmount = std::clamp(v28, 0.0f, 1.0f);

            Vector animationVelocity = GetSmoothedVelocity(m_nResolverData->get_animstate()->m_flLastClientSideAnimationUpdateTime * 2000.0f, velocity, player->get_velocity());
            float speed = std::fminf(animationVelocity.Length(), 260.0f);

            auto weapon = get_weapon(m_nResolverData->get_active_weapon());

            float flMaxMovementSpeed = 260.0f;
            if (weapon) {
                flMaxMovementSpeed = std::fmaxf(weapon->get_wpn_data_safe()->flMaxSpeed, 0.001f);
            }

            float m_flGroundFraction = *(float*)(m_nResolverData->get_anim_state() + 0x11C);

            float flRunningSpeed = speed / (flMaxMovementSpeed * 0.520f);
            float flDuckingSpeed = speed / (flMaxMovementSpeed * 0.340f);

            flRunningSpeed = std::clamp(flRunningSpeed, 0.0f, 1.0f);

            float flYawModifier = (((m_flGroundFraction * -0.3f) - 0.2f) * flRunningSpeed) + 1.0f;
            if (flDuckAmount > 0.0f) {
                float flDuckingSpeed = std::clamp(flDuckingSpeed, 0.0f, 1.0f);
                flYawModifier += (flDuckAmount * flDuckingSpeed) * (0.5f - flYawModifier);
            }

            m_flMinBodyYaw = flYawModifier * std::fabsf(((float)(uintptr_t(m_nResolverData->get_animstate()) + 0x330)));
            m_flMaxBodyYaw = flYawModifier * std::fabsf(((float)(uintptr_t(m_nResolverData->get_animstate()) + 0x334)));

        }
        if (m_nResolverData->m_iFlags & 1 && v5->m_fFlags[0x24] & 1 && !m_nResolverData->GetFlags && !state->byteC0C)
        {
            m_nSpeed = (m_nResolverData->m_vecVelocity_y * m_nResolverData->m_vecVelocity_y) + (m_nResolverData->m_vecVelocity_z * m_nResolverData->m_vecVelocity_z);
            if (m_nSpeed <= 0.1)
            {
                if (m_nResolverData->server_anim_layers[3] == 0.0
                    && m_nResolverData->server_anim_layers[3] == 0.0
                    && m_nResolverData->server_anim_layers[3] == 0.0)
                {
                    m_vec_angles.y = m_nResolverData->m_nResolvedEyeAngles_y;
                    m_nResolverData->ResolvingWay = 1;
                    m_Delta = Math::AngleDifference(m_vec_angles.y, state->m_flGoalFeetYaw);
                    m_nResolverData->ResolvingMethod = 2 * (m_Delta.clamp[0] <= 0.0) - 1;
                }
            }
            else if (!(m_nResolverData->server_anim_layers[12] * 1000.0) && (m_nResolverData->server_anim_layers[6].m_flWeight * 1000.f) == (previous.anim_layers[6].m_flWeight * 1000.f))
            {
                float DeltaFirst = abs(m_nResolverData->server_anim_layers[6].m_flPlaybackRate - m_nResolverData->resolver_anim_layers[0][6].m_flPlaybackRate);
                float DeltaSecond = abs(m_nResolverData->server_anim_layers[6].m_flPlaybackRate - m_nResolverData->resolver_anim_layers[1][6].m_flPlaybackRate);
                float DeltaThird = abs(m_nResolverData->server_anim_layers[6].m_flPlaybackRate - m_nResolverData->resolver_anim_layers[2][6].m_flPlaybackRate);

                if (DeltaFirst < DeltaSecond || DeltaThird <= DeltaSecond || (DeltaSecond * 1000.0))
                {
                    if (DeltaFirst >= DeltaThird && DeltaSecond > DeltaThird && !(DeltaThird * 1000.0))
                    {
                        m_nResolverData->ResolvingWay = 1;
                        m_nResolverData->ResolvingMethod = 1;
                    }
                }
                else
                {
                    m_nResolverData->ResolvingWay = 1;
                    m_nResolverData->ResolvingMethod = -1;
                }
            }
        }
    }
    // i just added this part here for example u should do some kind of resolver streangth to
    m_flbruteangle = (m_nResolverData->ResolvingMethod > 0.f) ? +m_flEstimatedMaxDesync : -m_flEstimatedMaxDesync;

    player->get_animstate()->m_flGoalFeetYaw = m_flbruteangle;

}
Fake many of this taken from all you did is adding useless stuff lol.

-Fake reversing

ALL credits should go to ikfakof and @uc
even that many things are from setupvelocity

Crazy shit even the vars are the same :
 

Вложения

Последнее редактирование:
When it hit it hit.
Забаненный
Статус
Оффлайн
Регистрация
2 Апр 2019
Сообщения
131
Реакции[?]
66
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Нефор
Забаненный
Статус
Оффлайн
Регистрация
9 Ноя 2018
Сообщения
1,042
Реакции[?]
663
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
When it hit it hit.
Забаненный
Статус
Оффлайн
Регистрация
2 Апр 2019
Сообщения
131
Реакции[?]
66
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Начинающий
Статус
Оффлайн
Регистрация
15 Окт 2018
Сообщения
22
Реакции[?]
2
Поинты[?]
0
" lets see who is gonna past this into weave or supremacy " nice variables naming then v23,v24 is not gonna help you with this shit, also you lack critical information why this is not possible to resolve desync on animlayers
 
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
81
Реакции[?]
96
Поинты[?]
0
" lets see who is gonna past this into weave or supremacy " nice variables naming then v23,v24 is not gonna help you with this shit, also you lack critical information why this is not possible to resolve desync on animlayers
oh god first of all some code is still psudo and u can resolve players by anim layers XD
 
Нефор
Забаненный
Статус
Оффлайн
Регистрация
9 Ноя 2018
Сообщения
1,042
Реакции[?]
663
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Нефор
Забаненный
Статус
Оффлайн
Регистрация
9 Ноя 2018
Сообщения
1,042
Реакции[?]
663
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ставь чайник, зажигай плиту
Эксперт
Статус
Оффлайн
Регистрация
22 Май 2020
Сообщения
1,444
Реакции[?]
1,092
Поинты[?]
10K
Начинающий
Статус
Оффлайн
Регистрация
15 Окт 2018
Сообщения
22
Реакции[?]
2
Поинты[?]
0
Забаненный
Статус
Оффлайн
Регистрация
14 Окт 2019
Сообщения
10
Реакции[?]
6
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
it's old v3 resolver, now, v3 doesnt use anims
v2 also used this

C++:
void __thiscall ragebot::resolver(int record_arg, ResolverData *data, ResolverData *prev_data)
{
  // [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]

  record = record_arg;
  if ( data )
  {
    if ( prev_data )
    {
      data->override_resolver = 0;
      if ( *(record_arg + 0x370) )              // not sure what this is
      {
        if ( data->flags & 1 && prev_data->flags & 1 )// dont know about this
        {
          velocity = ((data->velocity.x * data->velocity.x) + (data->velocity.y * data->velocity.y));
          sub_43F1CDB1();
          *&velocity = velocity;
          if ( *&velocity <= 0.1 )
          {
            if ( data->server_layers[3].weight == 0.0 && data->server_layers[3].cycle == 0.0 )
            {
              eye_yaw = data->eye_yaw;
              data->override_resolver = 1;
              data->resolver_index = 2 * (math::angle_diff(eye_yaw, record->lby) <= 0.0) - 1;// ( math::angle_diff( eye_yaw, lby ) <= 0.0 ) ? 1 : -1 ( ? )
            }
          }
          else if ( !(data->server_layers[12].weight * 1000.0)
                 && COERCE_SIGNED_INT(data->server_layers[6].weight * 1000.0) == COERCE_SIGNED_INT(
                                                                                   prev_data->server_layers[6].weight
                                                                                 * 1000.0)
                 && !record->unknown0 )
          {
            LODWORD(delta_1) = COERCE_UNSIGNED_INT(data->server_layers[6].playback_rate - data->fake_layers1[6].playback_rate) & abs_mask;
            LODWORD(delta_2) = COERCE_UNSIGNED_INT(data->server_layers[6].playback_rate - data->fake_layers2[6].playback_rate) & abs_mask;
            LODWORD(delta_3) = COERCE_UNSIGNED_INT(data->server_layers[6].playback_rate - data->fake_layers3[6].playback_rate) & abs_mask;

            if (delta_1 <delta_2 || delta_3 <= delta_2 || (delta_2 * 1000.0))
            {
              if ( delta_1 >= delta_3 && delta_2 > delta_3 && !(delta_3 * 1000.0) )
              {
                data->override_resolver = 1;
                data->resolver_index = 1;
              }
            }
            else
            {
              data->override_resolver = 1;
              data->resolver_index = -1;
            }
          }
        }
      }
    }
  }
}
 
Пользователь
Статус
Оффлайн
Регистрация
3 Янв 2020
Сообщения
81
Реакции[?]
96
Поинты[?]
0
oh really? then dont blindly paste those psudeo codes and start showing examples of which animlayers u can use for "resolving" static desync then
-_- i lost brain cells from u do u not know what reversing code is and dud i am not gonna spoon feed your a resolver for static desync just for u to paste into your paste why dont u just print out the anim layers values when they are using static desync hint [3] [5] [6]
 
Сверху Снизу