Исходник Legendware resolver (me 0iq)

Забаненный
Статус
Оффлайн
Регистрация
17 Июл 2021
Сообщения
39
Реакции[?]
18
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Не судите строго
Ресольвер был собран с разных сурсов )

C++:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)
{
    player = e;
    player_record = record;

    original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw);
    original_pitch = math::normalize_pitch(pitch);
}
float NormalizeYaw(float yaw)
{
    if (yaw > 180)
        yaw -= (round(yaw / 360) * 360.f);
    else if (yaw < -180)
        yaw += (round(yaw / 360) * -360.f);

    return yaw;
}
float AngleDiff(float destAngle, float srcAngle) {
    float delta;

    delta = fmodf(destAngle - srcAngle, 360.0f);
    if (destAngle > srcAngle) {
        if (delta >= 180)
            delta -= 360;
    }
    else {
        if (delta <= -180)
            delta += 360;
    }
    return delta;
}
Vector CalcAngle(const Vector& vecSource, const Vector& vecDestination)
{
    Vector qAngles;
    Vector delta = Vector((vecSource[0] - vecDestination[0]), (vecSource[1] - vecDestination[1]), (vecSource[2] - vecDestination[2]));
    float hyp = sqrtf(delta[0] * delta[0] + delta[1] * delta[1]);
    qAngles[0] = (float)(atan(delta[2] / hyp) * (180.0f / M_PI));
    qAngles[1] = (float)(atan(delta[1] / delta[0]) * (180.0f / M_PI));
    qAngles[2] = 0.f;
    if (delta[0] >= 0.f)
        qAngles[1] += 180.f;

    return qAngles;
}
static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};
float ClampYaw(float y) {
    if (y > 180)
    {
        y -= (round(y / 360) * 360.f);
    }
    else if (y < -180)
    {
        y += (round(y / 360) * -360.f);
    }
    return y;
}

void resolver::reset()
{
    player = nullptr;
    player_record = nullptr;

    side = false;
    fake = false;
    resolve_one = false;
    resolve_two = false;

    was_first_bruteforce = false;
    was_second_bruteforce = false;

    original_goal_feet_yaw = 0.0f;
    original_pitch = 0.0f;
}





bool freestand_target(player_t* target, float* yaw)
{
    float dmg_left = 0.f;
    float dmg_right = 0.f;

    static auto get_rotated_pos = [](Vector start, float rotation, float distance)
    {
        float rad = DEG2RAD(rotation);
        start.x += cos(rad) * distance;
        start.y += sin(rad) * distance;

        return start;
    };

    const auto local = g_ctx.local();

    if (!local || !target || !local->is_alive())
        return false;

    Vector local_eye_pos = target->get_shoot_position();
    Vector eye_pos = local->get_shoot_position();
    Vector angle = (local_eye_pos, eye_pos);

    auto backwards = target->m_angEyeAngles().y; // angle.y;

    Vector pos_left = get_rotated_pos(eye_pos, angle.y + 90.f, 60.f);
    Vector pos_right = get_rotated_pos(eye_pos, angle.y - 90.f, -60.f);

    const auto wall_left = (local_eye_pos, pos_left,
        nullptr, nullptr, local);

    const auto wall_right = (local_eye_pos, pos_right,
        nullptr, nullptr, local);



    if (dmg_left == 0.f && dmg_right == 0.f)
    {
        *yaw = backwards;
        return false;
    }

    // we can hit both sides, lets force backwards
    if (fabsf(dmg_left - dmg_right) < 5.f)
    {
        *yaw = backwards;
        return false;
    }

    bool direction = dmg_left > dmg_right;
    *yaw = direction ? angle.y - 90.f : angle.y + 90.f;

    return true;
}



//test
bool IsAdjustingBalances(player_t* player, AnimationLayer* record, AnimationLayer* layer)
{
    AnimationLayer animationLayer[15];
    AnimationLayer m_iLayerCount;
    for (int i = 0; i; i++)
    {
        const int activity = player->sequence_activity(animationLayer[i].m_nSequence);
        if (activity == 979)
        {
            *layer = animationLayer[i];
            return true;
        }
    }
    return false;
}


void update_walk_data(player_t* e)
{
    float previous, m_previous;
    previous = m_previous;

    AnimationLayer anim_layers[15];
    bool s_1 = false,
        s_2 = false,
        s_3 = false;

    for (int i = 0; i < e->animlayer_count(); i++)
    {
        anim_layers[i] = e->get_animlayers()[i];
        if (anim_layers[i].m_nSequence == 26 && anim_layers[i].m_flWeight < 0.4f)
            s_1 = true;
        if (anim_layers[i].m_nSequence == 7 && anim_layers[i].m_flWeight > 0.001f)
            s_2 = true;
        if (anim_layers[i].m_nSequence == 2 && anim_layers[i].m_flWeight == 0)
            s_3 = true;
    }
    float  m_fakewalking;
    if (s_1 && s_2)
        if (s_3)
            m_fakewalking = true;
        else
            m_fakewalking = false;
    else
        m_fakewalking = false;
}



#define ANIMATIONLAYER_H
#ifdef _WIN32
#pragma once
#endif




class C_AnimationLayer
{
public:


    C_AnimationLayer();
    void Reset();

    void SetOrder(int order);

public:

    bool IsActive(void);


    float GetFadeout(float flCurTime);

    float    m_flLayerAnimtime;
    float    m_flLayerFadeOuttime;
};
#ifdef CLIENT_DLL
#define CAnimationLayer C_AnimationLayer
#endif

inline void C_AnimationLayer::SetOrder(int order)
{
    int  m_nOrder = order;
}

inline void C_AnimationLayer::Reset()
{
    float    m_nSequence = 0;
    float    m_flPrevCycle = 0;
    float  m_flWeight = 0;
    float    m_flPlaybackRate = 0;
    float   m_flCycle = 0;
    float   m_flLayerAnimtime = 0;
    float  m_flLayerFadeOuttime = 0;
}


bool InFakeWalkOld(player_t* player)
{
    bool
        bFakewalking = false,
        stage1 = false,            // stages needed cause we are iterating all layers, eitherwise won't work :)
        stage2 = false,
        stage3 = false;
    AnimationLayer animationLayer[15];
    for (int i = 0; ; i++)
    {
        if (animationLayer[i].m_nSequence == 26 && animationLayer[i].m_flWeight < 0.47f)
            stage1 = true;

        if (animationLayer[i].m_nSequence == 7 && animationLayer[i].m_flWeight > 0.001f)
            stage2 = true;

        if (animationLayer[i].m_nSequence == 2 && animationLayer[i].m_flWeight == 0)
            stage3 = true;
    }

    if (stage1 && stage2)
        if (stage3 || (player->m_fFlags() & FL_DUCKING)) // since weight from stage3 can be 0 aswell when crouching, we need this kind of check, cause you can fakewalk while crouching, thats why it's nested under stage1 and stage2
            bFakewalking = true;
        else
            bFakewalking = false;
    else
        bFakewalking = false;

    return bFakewalking;
}
    



//fixLowDelta

bool fixlowdeltaEbab(player_t* player)
{

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    int m_side;
    float m_lby = player->m_flLowerBodyYawTarget();
    auto delta = math::normalize_yaw(player->m_angEyeAngles().y - 0.f);
    m_side = (delta > 0.f) ? -1 : 1;
    auto speed = player->m_vecVelocity().Length2D();
    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);
    m_lby = (delta > 0.f) ? -1 : 1;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    auto animstate = player->get_animation_state();

    if (speed < 0.1f && !choked && m_lby < 28.f && fabs(delta < 19.f)) // low delta resolve > 10.f delta
    {
        int i = player->EntIndex();
        if (m_side <= 1 && !choked) // if mside <= 1 && player->not_choke
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 19.f * m_side);  // not m_flgoalfeetyaw cuz lowdelta not choked and not desync'ing
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * -m_side);

            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) //missedshots case
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;

            }
        }
        else if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * m_side);
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
    }
    else if (speed < 0.1f && !choked && m_lby > -28.f && fabs(delta > -19.f)) // low delta resolve < -10 delta
    {
        int i = player->EntIndex();
        if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta + 28.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta - 28.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
        else if (m_side <= 1 && !choked)
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta - 11.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
                break;

            }
        }

    }


}


// yaw
float MaxYawModificator(player_t* enemy)
{
    auto animstate = enemy->get_animation_state();

    if (!animstate)
        return 0.0f;

    auto speedfactor = math::clamp(animstate->m_flFeetSpeedForwardsOrSideWays, 0.0f, 1.0f);
    auto avg_speedfactor = (animstate->m_flStopToFullRunningFraction * -0.3f - 0.2f) * speedfactor + 1.0f;

    auto duck_amount = animstate->m_fDuckAmount;

    if (duck_amount)
    {
        auto max_velocity = math::clamp(animstate->m_flFeetSpeedUnknownForwardOrSideways, 0.0f, 1.0f);
        auto duck_speed = duck_amount * max_velocity;

        avg_speedfactor += duck_speed * (0.5f - avg_speedfactor);
    }

    return animstate->yaw_desync_adjustment() * avg_speedfactor;
}



void resolver::resolve_yaw()
{
    player_info_t player_info;

    if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))
        return;


    if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())
        return;


    auto animstate = player->get_animation_state();
    float new_body_yaw_pose = 0.0f;
    auto m_flCurrentFeetYaw = player->get_animation_state()->m_flCurrentFeetYaw;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    float flMaxYawModifier = MaxYawModificator(player);
    float flMinYawModifier = player->get_animation_state()->pad10[512];
    auto delta = AngleDiff(m_flGoalFeetYaw, m_flEyeYaw);

    auto valid_lby = true;

    auto speed = player->m_vecVelocity().Length2D();

    float m_lby = player->m_flLowerBodyYawTarget();
    auto matfirst = player_record->matrixes_data.first;
    auto matsecond = player_record->matrixes_data.second;
    auto matzero = player_record->matrixes_data.zero;


    if (fabs(original_pitch) > 85.0f)
        fake = true;
    else if (!fake)
    {
        player_record->angles.y = original_goal_feet_yaw;
        return;
    }

    if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)
        valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;

    auto absangles = player_record->abs_angles.y + player_record->abs_angles.x;

    auto fire_first = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player);
    auto fire_second = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player);
    auto fire_third = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player);
    auto sidefirst = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));
    auto sidesecond = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));
    auto sidezero = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero));

    auto first_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player, g_ctx.local());
    auto second_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player, g_ctx.local());
    auto third_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player, g_ctx.local());


    auto matrix_detect_first = math::random_float(sidefirst - sidesecond, sidezero);
    auto matrix_detect_second = math::random_float(sidesecond - sidefirst, sidezero);

    auto v58 = *(float*)((uintptr_t)animstate + 0x334) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;
    auto v59 = *(float*)((uintptr_t)animstate + 0x330) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;

    auto angrec = player_record->angles.y;
    if (player_record->flags & MOVETYPE_NOCLIP && player->m_fFlags() & MOVETYPE_NOCLIP)
    {
        if (delta > 30.f)
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);

            }

        }
        else
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);

            }
        }
    }



    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);

    float m_flLastClientSideAnimationUpdateTimeDelta = 0.0f;

    auto recordangle = AngleDiff(angrec - m_flGoalFeetYaw, 360.f);

    AnimationLayer moveLayers[3][15];
    AnimationLayer layers[15];
    memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    memcpy(layers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    int m_side;
    int updateanim;
    m_lby = (delta > 0.f) ? 1 : -1;
    bool first_detected = false;
    bool second_detected = false;

    auto diff_matrix_first = AngleDiff(fire_first.visible - fire_second.visible, fire_third.visible);
    auto diff_matrix_second = AngleDiff(fire_second.visible - fire_first.visible, fire_third.visible);


    if (player_record->flags & FL_ONGROUND && player->m_fFlags() & FL_ONGROUND) {
        if (speed < 0.1f)
        {
            auto result = player->sequence_activity(player_record->layers[3].m_nSequence);

            m_side = (delta > 0.f) ? 1 : -1;

            if (result == 979) {
                if (int(layers[3].m_flCycle != int(layers[3].m_flCycle))) {
                    if (int(layers[3].m_flWeight == 0.0f && int(layers[3].m_flCycle == 0.0f)))
                    {

                        g_ctx.globals.updating_animation = true;

                        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f) * m_side;
                    }
                }
            }
        }
        else if (int(layers[12].m_flWeight < 0.01f || abs(int(layers[12].m_flWeight - (int(layers[12].m_flWeight) < 0.01f) && (int(layers[6].m_nSequence == (int(layers[6].m_nSequence))))))))
        {
            if (std::abs(layers[6].m_flWeight - layers[6].m_flWeight) < 0.01f)
            {
                float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
                float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);
                float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);

                if (int(delta1 * 1000.0f) < int(delta2 * 1000.0f) || int(delta3 * 1000.0f) <= int(delta2 * 1000.0f) || int(delta2 * 1000.0f))
                {
                    if (int(delta1 * 1000.0f) >= int(delta3 * 1000.0f) && int(delta2 * 1000.0f) > int(delta3 * 1000.0f) && !int(delta3 * 1000.0f))
                    {
                        g_ctx.globals.updating_animation = true;
                        m_side = 1;
                        updateanim = 1;
                    }
                }
                else
                {
                    g_ctx.globals.updating_animation = true;
                    m_side = -1;
                    updateanim = -1;
                }
            }
        }


    }
    int positives = 0;
    int negatives = 0;

    m_side = (delta > 0.f) ? 1 : -1;
    delta = -delta;
    if (delta > 30.f && matrix_detect_first != matrix_detect_second)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }

    }
    else if (delta < -30.f && matrix_detect_second != matrix_detect_first)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            }
        }

    }
    if (choked < 1 && player_record->flags & IN_WALK)
    {
        if (delta < 15.f)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11);
        }
        else
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11);
        }
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
            break;
        }

    }
    if (player_record->bot || choked < 1)
    {
        m_lby = false;
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + original_goal_feet_yaw);
    }
}

bool resolver::ent_use_jitter(player_t* player, int* new_side) {

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->EntIndex();

    float CurrentAngle = player->m_angEyeAngles().y;
    if (CurrentAngle, LastAngle[i], 50.f) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? 1 : -1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = m_globals()->m_curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - m_globals()->m_curtime >= TICKS_TO_TIME(17))
            || player->m_flSimulationTime() != player->m_flOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}

float layermove()
{
    AnimationLayer m_Layer[15][2];
    float C_BaseAnimatingOverlay;
    (C_BaseAnimatingOverlay, m_Layer[0][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flWeight, FIELD_FLOAT);
}

enum AnimTag_t
{
    ANIMTAG_UNINITIALIZED,
    ANIMTAG_STARTCYCLE_N,
    ANIMTAG_STARTCYCLE_NE,
    ANIMTAG_STARTCYCLE_E,
    ANIMTAG_STARTCYCLE_SE,
    ANIMTAG_STARTCYCLE_S,
    ANIMTAG_STARTCYCLE_SW,
    ANIMTAG_STARTCYCLE_W,
    ANIMTAG_STARTCYCLE_NW,
    ANIMTAG_AIMLIMIT_YAWMIN_IDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_IDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_WALK,
    ANIMTAG_AIMLIMIT_YAWMAX_WALK,
    ANIMTAG_AIMLIMIT_YAWMIN_RUN,
    ANIMTAG_AIMLIMIT_YAWMAX_RUN,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMIN_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMAX_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMIN_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMAX_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCHWALK,
    ANIMTAG_FLASHBANG_PASSABLE,
    ANIMTAG_WEAPON_POSTLAYER,
    ANIMTAG_MAX
};

void resolver_()
{

    int animstate;

    animstate = 128;

    if (animstate)
    {

        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 30.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 30.0;

    }
    float  max_yaw = 180;

    int yaw;
    if (yaw = 180)
    {


        max_yaw;


    }


    if (yaw < 180)
    {
        max_yaw < 180;
    }
}

float resolver::resolve_pitch()
{
    return original_pitch;
    return original_pitch = 0;
}
 
ЧВК EB_LAN
Забаненный
Статус
Оффлайн
Регистрация
12 Янв 2019
Сообщения
838
Реакции[?]
298
Поинты[?]
17K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Не судите строго
Ресольвер был собран с разных сурсов )

C++:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)
{
    player = e;
    player_record = record;

    original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw);
    original_pitch = math::normalize_pitch(pitch);
}
float NormalizeYaw(float yaw)
{
    if (yaw > 180)
        yaw -= (round(yaw / 360) * 360.f);
    else if (yaw < -180)
        yaw += (round(yaw / 360) * -360.f);

    return yaw;
}
float AngleDiff(float destAngle, float srcAngle) {
    float delta;

    delta = fmodf(destAngle - srcAngle, 360.0f);
    if (destAngle > srcAngle) {
        if (delta >= 180)
            delta -= 360;
    }
    else {
        if (delta <= -180)
            delta += 360;
    }
    return delta;
}
Vector CalcAngle(const Vector& vecSource, const Vector& vecDestination)
{
    Vector qAngles;
    Vector delta = Vector((vecSource[0] - vecDestination[0]), (vecSource[1] - vecDestination[1]), (vecSource[2] - vecDestination[2]));
    float hyp = sqrtf(delta[0] * delta[0] + delta[1] * delta[1]);
    qAngles[0] = (float)(atan(delta[2] / hyp) * (180.0f / M_PI));
    qAngles[1] = (float)(atan(delta[1] / delta[0]) * (180.0f / M_PI));
    qAngles[2] = 0.f;
    if (delta[0] >= 0.f)
        qAngles[1] += 180.f;

    return qAngles;
}
static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};
float ClampYaw(float y) {
    if (y > 180)
    {
        y -= (round(y / 360) * 360.f);
    }
    else if (y < -180)
    {
        y += (round(y / 360) * -360.f);
    }
    return y;
}

void resolver::reset()
{
    player = nullptr;
    player_record = nullptr;

    side = false;
    fake = false;
    resolve_one = false;
    resolve_two = false;

    was_first_bruteforce = false;
    was_second_bruteforce = false;

    original_goal_feet_yaw = 0.0f;
    original_pitch = 0.0f;
}





bool freestand_target(player_t* target, float* yaw)
{
    float dmg_left = 0.f;
    float dmg_right = 0.f;

    static auto get_rotated_pos = [](Vector start, float rotation, float distance)
    {
        float rad = DEG2RAD(rotation);
        start.x += cos(rad) * distance;
        start.y += sin(rad) * distance;

        return start;
    };

    const auto local = g_ctx.local();

    if (!local || !target || !local->is_alive())
        return false;

    Vector local_eye_pos = target->get_shoot_position();
    Vector eye_pos = local->get_shoot_position();
    Vector angle = (local_eye_pos, eye_pos);

    auto backwards = target->m_angEyeAngles().y; // angle.y;

    Vector pos_left = get_rotated_pos(eye_pos, angle.y + 90.f, 60.f);
    Vector pos_right = get_rotated_pos(eye_pos, angle.y - 90.f, -60.f);

    const auto wall_left = (local_eye_pos, pos_left,
        nullptr, nullptr, local);

    const auto wall_right = (local_eye_pos, pos_right,
        nullptr, nullptr, local);



    if (dmg_left == 0.f && dmg_right == 0.f)
    {
        *yaw = backwards;
        return false;
    }

    // we can hit both sides, lets force backwards
    if (fabsf(dmg_left - dmg_right) < 5.f)
    {
        *yaw = backwards;
        return false;
    }

    bool direction = dmg_left > dmg_right;
    *yaw = direction ? angle.y - 90.f : angle.y + 90.f;

    return true;
}



//test
bool IsAdjustingBalances(player_t* player, AnimationLayer* record, AnimationLayer* layer)
{
    AnimationLayer animationLayer[15];
    AnimationLayer m_iLayerCount;
    for (int i = 0; i; i++)
    {
        const int activity = player->sequence_activity(animationLayer[i].m_nSequence);
        if (activity == 979)
        {
            *layer = animationLayer[i];
            return true;
        }
    }
    return false;
}


void update_walk_data(player_t* e)
{
    float previous, m_previous;
    previous = m_previous;

    AnimationLayer anim_layers[15];
    bool s_1 = false,
        s_2 = false,
        s_3 = false;

    for (int i = 0; i < e->animlayer_count(); i++)
    {
        anim_layers[i] = e->get_animlayers()[i];
        if (anim_layers[i].m_nSequence == 26 && anim_layers[i].m_flWeight < 0.4f)
            s_1 = true;
        if (anim_layers[i].m_nSequence == 7 && anim_layers[i].m_flWeight > 0.001f)
            s_2 = true;
        if (anim_layers[i].m_nSequence == 2 && anim_layers[i].m_flWeight == 0)
            s_3 = true;
    }
    float  m_fakewalking;
    if (s_1 && s_2)
        if (s_3)
            m_fakewalking = true;
        else
            m_fakewalking = false;
    else
        m_fakewalking = false;
}



#define ANIMATIONLAYER_H
#ifdef _WIN32
#pragma once
#endif




class C_AnimationLayer
{
public:


    C_AnimationLayer();
    void Reset();

    void SetOrder(int order);

public:

    bool IsActive(void);


    float GetFadeout(float flCurTime);

    float    m_flLayerAnimtime;
    float    m_flLayerFadeOuttime;
};
#ifdef CLIENT_DLL
#define CAnimationLayer C_AnimationLayer
#endif

inline void C_AnimationLayer::SetOrder(int order)
{
    int  m_nOrder = order;
}

inline void C_AnimationLayer::Reset()
{
    float    m_nSequence = 0;
    float    m_flPrevCycle = 0;
    float  m_flWeight = 0;
    float    m_flPlaybackRate = 0;
    float   m_flCycle = 0;
    float   m_flLayerAnimtime = 0;
    float  m_flLayerFadeOuttime = 0;
}


bool InFakeWalkOld(player_t* player)
{
    bool
        bFakewalking = false,
        stage1 = false,            // stages needed cause we are iterating all layers, eitherwise won't work :)
        stage2 = false,
        stage3 = false;
    AnimationLayer animationLayer[15];
    for (int i = 0; ; i++)
    {
        if (animationLayer[i].m_nSequence == 26 && animationLayer[i].m_flWeight < 0.47f)
            stage1 = true;

        if (animationLayer[i].m_nSequence == 7 && animationLayer[i].m_flWeight > 0.001f)
            stage2 = true;

        if (animationLayer[i].m_nSequence == 2 && animationLayer[i].m_flWeight == 0)
            stage3 = true;
    }

    if (stage1 && stage2)
        if (stage3 || (player->m_fFlags() & FL_DUCKING)) // since weight from stage3 can be 0 aswell when crouching, we need this kind of check, cause you can fakewalk while crouching, thats why it's nested under stage1 and stage2
            bFakewalking = true;
        else
            bFakewalking = false;
    else
        bFakewalking = false;

    return bFakewalking;
}
   



//fixLowDelta

bool fixlowdeltaEbab(player_t* player)
{

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    int m_side;
    float m_lby = player->m_flLowerBodyYawTarget();
    auto delta = math::normalize_yaw(player->m_angEyeAngles().y - 0.f);
    m_side = (delta > 0.f) ? -1 : 1;
    auto speed = player->m_vecVelocity().Length2D();
    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);
    m_lby = (delta > 0.f) ? -1 : 1;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    auto animstate = player->get_animation_state();

    if (speed < 0.1f && !choked && m_lby < 28.f && fabs(delta < 19.f)) // low delta resolve > 10.f delta
    {
        int i = player->EntIndex();
        if (m_side <= 1 && !choked) // if mside <= 1 && player->not_choke
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 19.f * m_side);  // not m_flgoalfeetyaw cuz lowdelta not choked and not desync'ing
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * -m_side);

            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) //missedshots case
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;

            }
        }
        else if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * m_side);
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
    }
    else if (speed < 0.1f && !choked && m_lby > -28.f && fabs(delta > -19.f)) // low delta resolve < -10 delta
    {
        int i = player->EntIndex();
        if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta + 28.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta - 28.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
        else if (m_side <= 1 && !choked)
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta - 11.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
                break;

            }
        }

    }


}


// yaw
float MaxYawModificator(player_t* enemy)
{
    auto animstate = enemy->get_animation_state();

    if (!animstate)
        return 0.0f;

    auto speedfactor = math::clamp(animstate->m_flFeetSpeedForwardsOrSideWays, 0.0f, 1.0f);
    auto avg_speedfactor = (animstate->m_flStopToFullRunningFraction * -0.3f - 0.2f) * speedfactor + 1.0f;

    auto duck_amount = animstate->m_fDuckAmount;

    if (duck_amount)
    {
        auto max_velocity = math::clamp(animstate->m_flFeetSpeedUnknownForwardOrSideways, 0.0f, 1.0f);
        auto duck_speed = duck_amount * max_velocity;

        avg_speedfactor += duck_speed * (0.5f - avg_speedfactor);
    }

    return animstate->yaw_desync_adjustment() * avg_speedfactor;
}



void resolver::resolve_yaw()
{
    player_info_t player_info;

    if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))
        return;


    if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())
        return;


    auto animstate = player->get_animation_state();
    float new_body_yaw_pose = 0.0f;
    auto m_flCurrentFeetYaw = player->get_animation_state()->m_flCurrentFeetYaw;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    float flMaxYawModifier = MaxYawModificator(player);
    float flMinYawModifier = player->get_animation_state()->pad10[512];
    auto delta = AngleDiff(m_flGoalFeetYaw, m_flEyeYaw);

    auto valid_lby = true;

    auto speed = player->m_vecVelocity().Length2D();

    float m_lby = player->m_flLowerBodyYawTarget();
    auto matfirst = player_record->matrixes_data.first;
    auto matsecond = player_record->matrixes_data.second;
    auto matzero = player_record->matrixes_data.zero;


    if (fabs(original_pitch) > 85.0f)
        fake = true;
    else if (!fake)
    {
        player_record->angles.y = original_goal_feet_yaw;
        return;
    }

    if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)
        valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;

    auto absangles = player_record->abs_angles.y + player_record->abs_angles.x;

    auto fire_first = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player);
    auto fire_second = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player);
    auto fire_third = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player);
    auto sidefirst = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));
    auto sidesecond = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));
    auto sidezero = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero));

    auto first_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player, g_ctx.local());
    auto second_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player, g_ctx.local());
    auto third_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player, g_ctx.local());


    auto matrix_detect_first = math::random_float(sidefirst - sidesecond, sidezero);
    auto matrix_detect_second = math::random_float(sidesecond - sidefirst, sidezero);

    auto v58 = *(float*)((uintptr_t)animstate + 0x334) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;
    auto v59 = *(float*)((uintptr_t)animstate + 0x330) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;

    auto angrec = player_record->angles.y;
    if (player_record->flags & MOVETYPE_NOCLIP && player->m_fFlags() & MOVETYPE_NOCLIP)
    {
        if (delta > 30.f)
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);

            }

        }
        else
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);

            }
        }
    }



    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);

    float m_flLastClientSideAnimationUpdateTimeDelta = 0.0f;

    auto recordangle = AngleDiff(angrec - m_flGoalFeetYaw, 360.f);

    AnimationLayer moveLayers[3][15];
    AnimationLayer layers[15];
    memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    memcpy(layers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    int m_side;
    int updateanim;
    m_lby = (delta > 0.f) ? 1 : -1;
    bool first_detected = false;
    bool second_detected = false;

    auto diff_matrix_first = AngleDiff(fire_first.visible - fire_second.visible, fire_third.visible);
    auto diff_matrix_second = AngleDiff(fire_second.visible - fire_first.visible, fire_third.visible);


    if (player_record->flags & FL_ONGROUND && player->m_fFlags() & FL_ONGROUND) {
        if (speed < 0.1f)
        {
            auto result = player->sequence_activity(player_record->layers[3].m_nSequence);

            m_side = (delta > 0.f) ? 1 : -1;

            if (result == 979) {
                if (int(layers[3].m_flCycle != int(layers[3].m_flCycle))) {
                    if (int(layers[3].m_flWeight == 0.0f && int(layers[3].m_flCycle == 0.0f)))
                    {

                        g_ctx.globals.updating_animation = true;

                        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f) * m_side;
                    }
                }
            }
        }
        else if (int(layers[12].m_flWeight < 0.01f || abs(int(layers[12].m_flWeight - (int(layers[12].m_flWeight) < 0.01f) && (int(layers[6].m_nSequence == (int(layers[6].m_nSequence))))))))
        {
            if (std::abs(layers[6].m_flWeight - layers[6].m_flWeight) < 0.01f)
            {
                float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
                float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);
                float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);

                if (int(delta1 * 1000.0f) < int(delta2 * 1000.0f) || int(delta3 * 1000.0f) <= int(delta2 * 1000.0f) || int(delta2 * 1000.0f))
                {
                    if (int(delta1 * 1000.0f) >= int(delta3 * 1000.0f) && int(delta2 * 1000.0f) > int(delta3 * 1000.0f) && !int(delta3 * 1000.0f))
                    {
                        g_ctx.globals.updating_animation = true;
                        m_side = 1;
                        updateanim = 1;
                    }
                }
                else
                {
                    g_ctx.globals.updating_animation = true;
                    m_side = -1;
                    updateanim = -1;
                }
            }
        }


    }
    int positives = 0;
    int negatives = 0;

    m_side = (delta > 0.f) ? 1 : -1;
    delta = -delta;
    if (delta > 30.f && matrix_detect_first != matrix_detect_second)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }

    }
    else if (delta < -30.f && matrix_detect_second != matrix_detect_first)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            }
        }

    }
    if (choked < 1 && player_record->flags & IN_WALK)
    {
        if (delta < 15.f)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11);
        }
        else
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11);
        }
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
            break;
        }

    }
    if (player_record->bot || choked < 1)
    {
        m_lby = false;
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + original_goal_feet_yaw);
    }
}

bool resolver::ent_use_jitter(player_t* player, int* new_side) {

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->EntIndex();

    float CurrentAngle = player->m_angEyeAngles().y;
    if (CurrentAngle, LastAngle[i], 50.f) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? 1 : -1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = m_globals()->m_curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - m_globals()->m_curtime >= TICKS_TO_TIME(17))
            || player->m_flSimulationTime() != player->m_flOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}

float layermove()
{
    AnimationLayer m_Layer[15][2];
    float C_BaseAnimatingOverlay;
    (C_BaseAnimatingOverlay, m_Layer[0][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flWeight, FIELD_FLOAT);
}

enum AnimTag_t
{
    ANIMTAG_UNINITIALIZED,
    ANIMTAG_STARTCYCLE_N,
    ANIMTAG_STARTCYCLE_NE,
    ANIMTAG_STARTCYCLE_E,
    ANIMTAG_STARTCYCLE_SE,
    ANIMTAG_STARTCYCLE_S,
    ANIMTAG_STARTCYCLE_SW,
    ANIMTAG_STARTCYCLE_W,
    ANIMTAG_STARTCYCLE_NW,
    ANIMTAG_AIMLIMIT_YAWMIN_IDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_IDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_WALK,
    ANIMTAG_AIMLIMIT_YAWMAX_WALK,
    ANIMTAG_AIMLIMIT_YAWMIN_RUN,
    ANIMTAG_AIMLIMIT_YAWMAX_RUN,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMIN_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMAX_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMIN_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMAX_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCHWALK,
    ANIMTAG_FLASHBANG_PASSABLE,
    ANIMTAG_WEAPON_POSTLAYER,
    ANIMTAG_MAX
};

void resolver_()
{

    int animstate;

    animstate = 128;

    if (animstate)
    {

        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 30.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 30.0;

    }
    float  max_yaw = 180;

    int yaw;
    if (yaw = 180)
    {


        max_yaw;


    }


    if (yaw < 180)
    {
        max_yaw < 180;
    }
}

float resolver::resolve_pitch()
{
    return original_pitch;
    return original_pitch = 0;
}
конечно давай делать мат. часть в резольвере
C++:
AnimationLayer moveLayers[3][15];
    AnimationLayer layers[15];
а ничего что игра используют только 13
C++:
memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    memcpy(layers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
почитай пж о мемкопи блинб
фу нахуй с таким резольвером только ботов пинать в боди
 
B.O.M.J
Эксперт
Статус
Оффлайн
Регистрация
19 Май 2017
Сообщения
2,403
Реакции[?]
897
Поинты[?]
3K
Участник
Статус
Оффлайн
Регистрация
30 Авг 2020
Сообщения
660
Реакции[?]
396
Поинты[?]
16K
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch) { player = e; player_record = record; original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw); original_pitch = math::normalize_pitch(pitch); } float NormalizeYaw(float yaw) { if (yaw > 180) yaw -= (round(yaw / 360) * 360.f); else if (yaw < -180) yaw += (round(yaw / 360) * -360.f); return yaw; } float AngleDiff(float destAngle, float srcAngle) { float delta; delta = fmodf(destAngle - srcAngle, 360.0f); if (destAngle > srcAngle) { if (delta >= 180) delta -= 360; } else { if (delta <= -180) delta += 360; } return delta; }
О да, ДАВАЙ , ДАВАААААААААААААЙ!!!!!!!
switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) //missedshots case { case 0: delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f); break; case 1: delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f); break; }
switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) { case 0: delta = math::normalize_yaw(player->m_angEyeAngles().y + 11.f); break; case 1: delta = math::normalize_yaw(player->m_angEyeAngles().y - 11.f); break; }
за такое руки бы сломать автору и заставить идти делать школьные задания на лето
else if (int(layers[12].m_flWeight < 0.01f || abs(int(layers[12].m_flWeight - (int(layers[12].m_flWeight) < 0.01f) && (int(layers[6].m_nSequence == (int(layers[6].m_nSequence)))))))) { if (std::abs(layers[6].m_flWeight - layers[6].m_flWeight) < 0.01f) { float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate); float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate); float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate); if (int(delta1 * 1000.0f) < int(delta2 * 1000.0f) || int(delta3 * 1000.0f) <= int(delta2 * 1000.0f) || int(delta2 * 1000.0f)) { if (int(delta1 * 1000.0f) >= int(delta3 * 1000.0f) && int(delta2 * 1000.0f) > int(delta3 * 1000.0f) && !int(delta3 * 1000.0f)) { g_ctx.globals.updating_animation = true; m_side = 1; updateanim = 1; } } else { g_ctx.globals.updating_animation = true; m_side = -1; updateanim = -1; }
А вот тут даже мне хуёво стало, вызывайте скорую
 
Забаненный
Статус
Оффлайн
Регистрация
23 Авг 2020
Сообщения
2,110
Реакции[?]
597
Поинты[?]
10K
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Не судите строго
Ресольвер был собран с разных сурсов )

C++:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)
{
    player = e;
    player_record = record;

    original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw);
    original_pitch = math::normalize_pitch(pitch);
}
float NormalizeYaw(float yaw)
{
    if (yaw > 180)
        yaw -= (round(yaw / 360) * 360.f);
    else if (yaw < -180)
        yaw += (round(yaw / 360) * -360.f);

    return yaw;
}
float AngleDiff(float destAngle, float srcAngle) {
    float delta;

    delta = fmodf(destAngle - srcAngle, 360.0f);
    if (destAngle > srcAngle) {
        if (delta >= 180)
            delta -= 360;
    }
    else {
        if (delta <= -180)
            delta += 360;
    }
    return delta;
}
Vector CalcAngle(const Vector& vecSource, const Vector& vecDestination)
{
    Vector qAngles;
    Vector delta = Vector((vecSource[0] - vecDestination[0]), (vecSource[1] - vecDestination[1]), (vecSource[2] - vecDestination[2]));
    float hyp = sqrtf(delta[0] * delta[0] + delta[1] * delta[1]);
    qAngles[0] = (float)(atan(delta[2] / hyp) * (180.0f / M_PI));
    qAngles[1] = (float)(atan(delta[1] / delta[0]) * (180.0f / M_PI));
    qAngles[2] = 0.f;
    if (delta[0] >= 0.f)
        qAngles[1] += 180.f;

    return qAngles;
}
static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};
float ClampYaw(float y) {
    if (y > 180)
    {
        y -= (round(y / 360) * 360.f);
    }
    else if (y < -180)
    {
        y += (round(y / 360) * -360.f);
    }
    return y;
}

void resolver::reset()
{
    player = nullptr;
    player_record = nullptr;

    side = false;
    fake = false;
    resolve_one = false;
    resolve_two = false;

    was_first_bruteforce = false;
    was_second_bruteforce = false;

    original_goal_feet_yaw = 0.0f;
    original_pitch = 0.0f;
}





bool freestand_target(player_t* target, float* yaw)
{
    float dmg_left = 0.f;
    float dmg_right = 0.f;

    static auto get_rotated_pos = [](Vector start, float rotation, float distance)
    {
        float rad = DEG2RAD(rotation);
        start.x += cos(rad) * distance;
        start.y += sin(rad) * distance;

        return start;
    };

    const auto local = g_ctx.local();

    if (!local || !target || !local->is_alive())
        return false;

    Vector local_eye_pos = target->get_shoot_position();
    Vector eye_pos = local->get_shoot_position();
    Vector angle = (local_eye_pos, eye_pos);

    auto backwards = target->m_angEyeAngles().y; // angle.y;

    Vector pos_left = get_rotated_pos(eye_pos, angle.y + 90.f, 60.f);
    Vector pos_right = get_rotated_pos(eye_pos, angle.y - 90.f, -60.f);

    const auto wall_left = (local_eye_pos, pos_left,
        nullptr, nullptr, local);

    const auto wall_right = (local_eye_pos, pos_right,
        nullptr, nullptr, local);



    if (dmg_left == 0.f && dmg_right == 0.f)
    {
        *yaw = backwards;
        return false;
    }

    // we can hit both sides, lets force backwards
    if (fabsf(dmg_left - dmg_right) < 5.f)
    {
        *yaw = backwards;
        return false;
    }

    bool direction = dmg_left > dmg_right;
    *yaw = direction ? angle.y - 90.f : angle.y + 90.f;

    return true;
}



//test
bool IsAdjustingBalances(player_t* player, AnimationLayer* record, AnimationLayer* layer)
{
    AnimationLayer animationLayer[15];
    AnimationLayer m_iLayerCount;
    for (int i = 0; i; i++)
    {
        const int activity = player->sequence_activity(animationLayer[i].m_nSequence);
        if (activity == 979)
        {
            *layer = animationLayer[i];
            return true;
        }
    }
    return false;
}


void update_walk_data(player_t* e)
{
    float previous, m_previous;
    previous = m_previous;

    AnimationLayer anim_layers[15];
    bool s_1 = false,
        s_2 = false,
        s_3 = false;

    for (int i = 0; i < e->animlayer_count(); i++)
    {
        anim_layers[i] = e->get_animlayers()[i];
        if (anim_layers[i].m_nSequence == 26 && anim_layers[i].m_flWeight < 0.4f)
            s_1 = true;
        if (anim_layers[i].m_nSequence == 7 && anim_layers[i].m_flWeight > 0.001f)
            s_2 = true;
        if (anim_layers[i].m_nSequence == 2 && anim_layers[i].m_flWeight == 0)
            s_3 = true;
    }
    float  m_fakewalking;
    if (s_1 && s_2)
        if (s_3)
            m_fakewalking = true;
        else
            m_fakewalking = false;
    else
        m_fakewalking = false;
}



#define ANIMATIONLAYER_H
#ifdef _WIN32
#pragma once
#endif




class C_AnimationLayer
{
public:


    C_AnimationLayer();
    void Reset();

    void SetOrder(int order);

public:

    bool IsActive(void);


    float GetFadeout(float flCurTime);

    float    m_flLayerAnimtime;
    float    m_flLayerFadeOuttime;
};
#ifdef CLIENT_DLL
#define CAnimationLayer C_AnimationLayer
#endif

inline void C_AnimationLayer::SetOrder(int order)
{
    int  m_nOrder = order;
}

inline void C_AnimationLayer::Reset()
{
    float    m_nSequence = 0;
    float    m_flPrevCycle = 0;
    float  m_flWeight = 0;
    float    m_flPlaybackRate = 0;
    float   m_flCycle = 0;
    float   m_flLayerAnimtime = 0;
    float  m_flLayerFadeOuttime = 0;
}


bool InFakeWalkOld(player_t* player)
{
    bool
        bFakewalking = false,
        stage1 = false,            // stages needed cause we are iterating all layers, eitherwise won't work :)
        stage2 = false,
        stage3 = false;
    AnimationLayer animationLayer[15];
    for (int i = 0; ; i++)
    {
        if (animationLayer[i].m_nSequence == 26 && animationLayer[i].m_flWeight < 0.47f)
            stage1 = true;

        if (animationLayer[i].m_nSequence == 7 && animationLayer[i].m_flWeight > 0.001f)
            stage2 = true;

        if (animationLayer[i].m_nSequence == 2 && animationLayer[i].m_flWeight == 0)
            stage3 = true;
    }

    if (stage1 && stage2)
        if (stage3 || (player->m_fFlags() & FL_DUCKING)) // since weight from stage3 can be 0 aswell when crouching, we need this kind of check, cause you can fakewalk while crouching, thats why it's nested under stage1 and stage2
            bFakewalking = true;
        else
            bFakewalking = false;
    else
        bFakewalking = false;

    return bFakewalking;
}
   



//fixLowDelta

bool fixlowdeltaEbab(player_t* player)
{

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    int m_side;
    float m_lby = player->m_flLowerBodyYawTarget();
    auto delta = math::normalize_yaw(player->m_angEyeAngles().y - 0.f);
    m_side = (delta > 0.f) ? -1 : 1;
    auto speed = player->m_vecVelocity().Length2D();
    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);
    m_lby = (delta > 0.f) ? -1 : 1;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    auto animstate = player->get_animation_state();

    if (speed < 0.1f && !choked && m_lby < 28.f && fabs(delta < 19.f)) // low delta resolve > 10.f delta
    {
        int i = player->EntIndex();
        if (m_side <= 1 && !choked) // if mside <= 1 && player->not_choke
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 19.f * m_side);  // not m_flgoalfeetyaw cuz lowdelta not choked and not desync'ing
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * -m_side);

            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) //missedshots case
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;

            }
        }
        else if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * m_side);
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
    }
    else if (speed < 0.1f && !choked && m_lby > -28.f && fabs(delta > -19.f)) // low delta resolve < -10 delta
    {
        int i = player->EntIndex();
        if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta + 28.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta - 28.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
        else if (m_side <= 1 && !choked)
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta - 11.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
                break;

            }
        }

    }


}


// yaw
float MaxYawModificator(player_t* enemy)
{
    auto animstate = enemy->get_animation_state();

    if (!animstate)
        return 0.0f;

    auto speedfactor = math::clamp(animstate->m_flFeetSpeedForwardsOrSideWays, 0.0f, 1.0f);
    auto avg_speedfactor = (animstate->m_flStopToFullRunningFraction * -0.3f - 0.2f) * speedfactor + 1.0f;

    auto duck_amount = animstate->m_fDuckAmount;

    if (duck_amount)
    {
        auto max_velocity = math::clamp(animstate->m_flFeetSpeedUnknownForwardOrSideways, 0.0f, 1.0f);
        auto duck_speed = duck_amount * max_velocity;

        avg_speedfactor += duck_speed * (0.5f - avg_speedfactor);
    }

    return animstate->yaw_desync_adjustment() * avg_speedfactor;
}



void resolver::resolve_yaw()
{
    player_info_t player_info;

    if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))
        return;


    if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())
        return;


    auto animstate = player->get_animation_state();
    float new_body_yaw_pose = 0.0f;
    auto m_flCurrentFeetYaw = player->get_animation_state()->m_flCurrentFeetYaw;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    float flMaxYawModifier = MaxYawModificator(player);
    float flMinYawModifier = player->get_animation_state()->pad10[512];
    auto delta = AngleDiff(m_flGoalFeetYaw, m_flEyeYaw);

    auto valid_lby = true;

    auto speed = player->m_vecVelocity().Length2D();

    float m_lby = player->m_flLowerBodyYawTarget();
    auto matfirst = player_record->matrixes_data.first;
    auto matsecond = player_record->matrixes_data.second;
    auto matzero = player_record->matrixes_data.zero;


    if (fabs(original_pitch) > 85.0f)
        fake = true;
    else if (!fake)
    {
        player_record->angles.y = original_goal_feet_yaw;
        return;
    }

    if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)
        valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;

    auto absangles = player_record->abs_angles.y + player_record->abs_angles.x;

    auto fire_first = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player);
    auto fire_second = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player);
    auto fire_third = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player);
    auto sidefirst = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));
    auto sidesecond = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));
    auto sidezero = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero));

    auto first_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player, g_ctx.local());
    auto second_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player, g_ctx.local());
    auto third_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player, g_ctx.local());


    auto matrix_detect_first = math::random_float(sidefirst - sidesecond, sidezero);
    auto matrix_detect_second = math::random_float(sidesecond - sidefirst, sidezero);

    auto v58 = *(float*)((uintptr_t)animstate + 0x334) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;
    auto v59 = *(float*)((uintptr_t)animstate + 0x330) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;

    auto angrec = player_record->angles.y;
    if (player_record->flags & MOVETYPE_NOCLIP && player->m_fFlags() & MOVETYPE_NOCLIP)
    {
        if (delta > 30.f)
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);

            }

        }
        else
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);

            }
        }
    }



    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);

    float m_flLastClientSideAnimationUpdateTimeDelta = 0.0f;

    auto recordangle = AngleDiff(angrec - m_flGoalFeetYaw, 360.f);

    AnimationLayer moveLayers[3][15];
    AnimationLayer layers[15];
    memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    memcpy(layers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    int m_side;
    int updateanim;
    m_lby = (delta > 0.f) ? 1 : -1;
    bool first_detected = false;
    bool second_detected = false;

    auto diff_matrix_first = AngleDiff(fire_first.visible - fire_second.visible, fire_third.visible);
    auto diff_matrix_second = AngleDiff(fire_second.visible - fire_first.visible, fire_third.visible);


    if (player_record->flags & FL_ONGROUND && player->m_fFlags() & FL_ONGROUND) {
        if (speed < 0.1f)
        {
            auto result = player->sequence_activity(player_record->layers[3].m_nSequence);

            m_side = (delta > 0.f) ? 1 : -1;

            if (result == 979) {
                if (int(layers[3].m_flCycle != int(layers[3].m_flCycle))) {
                    if (int(layers[3].m_flWeight == 0.0f && int(layers[3].m_flCycle == 0.0f)))
                    {

                        g_ctx.globals.updating_animation = true;

                        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f) * m_side;
                    }
                }
            }
        }
        else if (int(layers[12].m_flWeight < 0.01f || abs(int(layers[12].m_flWeight - (int(layers[12].m_flWeight) < 0.01f) && (int(layers[6].m_nSequence == (int(layers[6].m_nSequence))))))))
        {
            if (std::abs(layers[6].m_flWeight - layers[6].m_flWeight) < 0.01f)
            {
                float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
                float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);
                float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);

                if (int(delta1 * 1000.0f) < int(delta2 * 1000.0f) || int(delta3 * 1000.0f) <= int(delta2 * 1000.0f) || int(delta2 * 1000.0f))
                {
                    if (int(delta1 * 1000.0f) >= int(delta3 * 1000.0f) && int(delta2 * 1000.0f) > int(delta3 * 1000.0f) && !int(delta3 * 1000.0f))
                    {
                        g_ctx.globals.updating_animation = true;
                        m_side = 1;
                        updateanim = 1;
                    }
                }
                else
                {
                    g_ctx.globals.updating_animation = true;
                    m_side = -1;
                    updateanim = -1;
                }
            }
        }


    }
    int positives = 0;
    int negatives = 0;

    m_side = (delta > 0.f) ? 1 : -1;
    delta = -delta;
    if (delta > 30.f && matrix_detect_first != matrix_detect_second)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }

    }
    else if (delta < -30.f && matrix_detect_second != matrix_detect_first)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            }
        }

    }
    if (choked < 1 && player_record->flags & IN_WALK)
    {
        if (delta < 15.f)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11);
        }
        else
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11);
        }
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
            break;
        }

    }
    if (player_record->bot || choked < 1)
    {
        m_lby = false;
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + original_goal_feet_yaw);
    }
}

bool resolver::ent_use_jitter(player_t* player, int* new_side) {

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->EntIndex();

    float CurrentAngle = player->m_angEyeAngles().y;
    if (CurrentAngle, LastAngle[i], 50.f) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? 1 : -1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = m_globals()->m_curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - m_globals()->m_curtime >= TICKS_TO_TIME(17))
            || player->m_flSimulationTime() != player->m_flOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}

float layermove()
{
    AnimationLayer m_Layer[15][2];
    float C_BaseAnimatingOverlay;
    (C_BaseAnimatingOverlay, m_Layer[0][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flWeight, FIELD_FLOAT);
}

enum AnimTag_t
{
    ANIMTAG_UNINITIALIZED,
    ANIMTAG_STARTCYCLE_N,
    ANIMTAG_STARTCYCLE_NE,
    ANIMTAG_STARTCYCLE_E,
    ANIMTAG_STARTCYCLE_SE,
    ANIMTAG_STARTCYCLE_S,
    ANIMTAG_STARTCYCLE_SW,
    ANIMTAG_STARTCYCLE_W,
    ANIMTAG_STARTCYCLE_NW,
    ANIMTAG_AIMLIMIT_YAWMIN_IDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_IDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_WALK,
    ANIMTAG_AIMLIMIT_YAWMAX_WALK,
    ANIMTAG_AIMLIMIT_YAWMIN_RUN,
    ANIMTAG_AIMLIMIT_YAWMAX_RUN,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMIN_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMAX_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMIN_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMAX_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCHWALK,
    ANIMTAG_FLASHBANG_PASSABLE,
    ANIMTAG_WEAPON_POSTLAYER,
    ANIMTAG_MAX
};

void resolver_()
{

    int animstate;

    animstate = 128;

    if (animstate)
    {

        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 30.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 30.0;

    }
    float  max_yaw = 180;

    int yaw;
    if (yaw = 180)
    {


        max_yaw;


    }


    if (yaw < 180)
    {
        max_yaw < 180;
    }
}

float resolver::resolve_pitch()
{
    return original_pitch;
    return original_pitch = 0;
}
1627047101277.png
КТО КУДА, А Я ПО СЪЕБАМ))))
 
Участник
Статус
Оффлайн
Регистрация
30 Авг 2020
Сообщения
660
Реакции[?]
396
Поинты[?]
16K
Не судите строго
Ресольвер был собран с разных сурсов )

C++:
void resolver::initialize(player_t* e, adjust_data* record, const float& goal_feet_yaw, const float& pitch)
{
    player = e;
    player_record = record;

    original_goal_feet_yaw = math::normalize_yaw(goal_feet_yaw);
    original_pitch = math::normalize_pitch(pitch);
}
float NormalizeYaw(float yaw)
{
    if (yaw > 180)
        yaw -= (round(yaw / 360) * 360.f);
    else if (yaw < -180)
        yaw += (round(yaw / 360) * -360.f);

    return yaw;
}
float AngleDiff(float destAngle, float srcAngle) {
    float delta;

    delta = fmodf(destAngle - srcAngle, 360.0f);
    if (destAngle > srcAngle) {
        if (delta >= 180)
            delta -= 360;
    }
    else {
        if (delta <= -180)
            delta += 360;
    }
    return delta;
}
Vector CalcAngle(const Vector& vecSource, const Vector& vecDestination)
{
    Vector qAngles;
    Vector delta = Vector((vecSource[0] - vecDestination[0]), (vecSource[1] - vecDestination[1]), (vecSource[2] - vecDestination[2]));
    float hyp = sqrtf(delta[0] * delta[0] + delta[1] * delta[1]);
    qAngles[0] = (float)(atan(delta[2] / hyp) * (180.0f / M_PI));
    qAngles[1] = (float)(atan(delta[1] / delta[0]) * (180.0f / M_PI));
    qAngles[2] = 0.f;
    if (delta[0] >= 0.f)
        qAngles[1] += 180.f;

    return qAngles;
}
static auto GetSmoothedVelocity = [](float min_delta, Vector a, Vector b) {
    Vector delta = a - b;
    float delta_length = delta.Length();

    if (delta_length <= min_delta) {
        Vector result;
        if (-min_delta <= delta_length) {
            return a;
        }
        else {
            float iradius = 1.0f / (delta_length + FLT_EPSILON);
            return b - ((delta * iradius) * min_delta);
        }
    }
    else {
        float iradius = 1.0f / (delta_length + FLT_EPSILON);
        return b + ((delta * iradius) * min_delta);
    }
};
float ClampYaw(float y) {
    if (y > 180)
    {
        y -= (round(y / 360) * 360.f);
    }
    else if (y < -180)
    {
        y += (round(y / 360) * -360.f);
    }
    return y;
}

void resolver::reset()
{
    player = nullptr;
    player_record = nullptr;

    side = false;
    fake = false;
    resolve_one = false;
    resolve_two = false;

    was_first_bruteforce = false;
    was_second_bruteforce = false;

    original_goal_feet_yaw = 0.0f;
    original_pitch = 0.0f;
}





bool freestand_target(player_t* target, float* yaw)
{
    float dmg_left = 0.f;
    float dmg_right = 0.f;

    static auto get_rotated_pos = [](Vector start, float rotation, float distance)
    {
        float rad = DEG2RAD(rotation);
        start.x += cos(rad) * distance;
        start.y += sin(rad) * distance;

        return start;
    };

    const auto local = g_ctx.local();

    if (!local || !target || !local->is_alive())
        return false;

    Vector local_eye_pos = target->get_shoot_position();
    Vector eye_pos = local->get_shoot_position();
    Vector angle = (local_eye_pos, eye_pos);

    auto backwards = target->m_angEyeAngles().y; // angle.y;

    Vector pos_left = get_rotated_pos(eye_pos, angle.y + 90.f, 60.f);
    Vector pos_right = get_rotated_pos(eye_pos, angle.y - 90.f, -60.f);

    const auto wall_left = (local_eye_pos, pos_left,
        nullptr, nullptr, local);

    const auto wall_right = (local_eye_pos, pos_right,
        nullptr, nullptr, local);



    if (dmg_left == 0.f && dmg_right == 0.f)
    {
        *yaw = backwards;
        return false;
    }

    // we can hit both sides, lets force backwards
    if (fabsf(dmg_left - dmg_right) < 5.f)
    {
        *yaw = backwards;
        return false;
    }

    bool direction = dmg_left > dmg_right;
    *yaw = direction ? angle.y - 90.f : angle.y + 90.f;

    return true;
}



//test
bool IsAdjustingBalances(player_t* player, AnimationLayer* record, AnimationLayer* layer)
{
    AnimationLayer animationLayer[15];
    AnimationLayer m_iLayerCount;
    for (int i = 0; i; i++)
    {
        const int activity = player->sequence_activity(animationLayer[i].m_nSequence);
        if (activity == 979)
        {
            *layer = animationLayer[i];
            return true;
        }
    }
    return false;
}


void update_walk_data(player_t* e)
{
    float previous, m_previous;
    previous = m_previous;

    AnimationLayer anim_layers[15];
    bool s_1 = false,
        s_2 = false,
        s_3 = false;

    for (int i = 0; i < e->animlayer_count(); i++)
    {
        anim_layers[i] = e->get_animlayers()[i];
        if (anim_layers[i].m_nSequence == 26 && anim_layers[i].m_flWeight < 0.4f)
            s_1 = true;
        if (anim_layers[i].m_nSequence == 7 && anim_layers[i].m_flWeight > 0.001f)
            s_2 = true;
        if (anim_layers[i].m_nSequence == 2 && anim_layers[i].m_flWeight == 0)
            s_3 = true;
    }
    float  m_fakewalking;
    if (s_1 && s_2)
        if (s_3)
            m_fakewalking = true;
        else
            m_fakewalking = false;
    else
        m_fakewalking = false;
}



#define ANIMATIONLAYER_H
#ifdef _WIN32
#pragma once
#endif




class C_AnimationLayer
{
public:


    C_AnimationLayer();
    void Reset();

    void SetOrder(int order);

public:

    bool IsActive(void);


    float GetFadeout(float flCurTime);

    float    m_flLayerAnimtime;
    float    m_flLayerFadeOuttime;
};
#ifdef CLIENT_DLL
#define CAnimationLayer C_AnimationLayer
#endif

inline void C_AnimationLayer::SetOrder(int order)
{
    int  m_nOrder = order;
}

inline void C_AnimationLayer::Reset()
{
    float    m_nSequence = 0;
    float    m_flPrevCycle = 0;
    float  m_flWeight = 0;
    float    m_flPlaybackRate = 0;
    float   m_flCycle = 0;
    float   m_flLayerAnimtime = 0;
    float  m_flLayerFadeOuttime = 0;
}


bool InFakeWalkOld(player_t* player)
{
    bool
        bFakewalking = false,
        stage1 = false,            // stages needed cause we are iterating all layers, eitherwise won't work :)
        stage2 = false,
        stage3 = false;
    AnimationLayer animationLayer[15];
    for (int i = 0; ; i++)
    {
        if (animationLayer[i].m_nSequence == 26 && animationLayer[i].m_flWeight < 0.47f)
            stage1 = true;

        if (animationLayer[i].m_nSequence == 7 && animationLayer[i].m_flWeight > 0.001f)
            stage2 = true;

        if (animationLayer[i].m_nSequence == 2 && animationLayer[i].m_flWeight == 0)
            stage3 = true;
    }

    if (stage1 && stage2)
        if (stage3 || (player->m_fFlags() & FL_DUCKING)) // since weight from stage3 can be 0 aswell when crouching, we need this kind of check, cause you can fakewalk while crouching, thats why it's nested under stage1 and stage2
            bFakewalking = true;
        else
            bFakewalking = false;
    else
        bFakewalking = false;

    return bFakewalking;
}
   



//fixLowDelta

bool fixlowdeltaEbab(player_t* player)
{

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    int m_side;
    float m_lby = player->m_flLowerBodyYawTarget();
    auto delta = math::normalize_yaw(player->m_angEyeAngles().y - 0.f);
    m_side = (delta > 0.f) ? -1 : 1;
    auto speed = player->m_vecVelocity().Length2D();
    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);
    m_lby = (delta > 0.f) ? -1 : 1;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    auto animstate = player->get_animation_state();

    if (speed < 0.1f && !choked && m_lby < 28.f && fabs(delta < 19.f)) // low delta resolve > 10.f delta
    {
        int i = player->EntIndex();
        if (m_side <= 1 && !choked) // if mside <= 1 && player->not_choke
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 19.f * m_side);  // not m_flgoalfeetyaw cuz lowdelta not choked and not desync'ing
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * -m_side);

            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2) //missedshots case
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;

            }
        }
        else if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta - 19.f * m_side);
            }
            else
            {
                AngleDiff(m_flEyeYaw - m_flGoalFeetYaw, 360.f);
                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
    }
    else if (speed < 0.1f && !choked && m_lby > -28.f && fabs(delta > -19.f)) // low delta resolve < -10 delta
    {
        int i = player->EntIndex();
        if (m_side >= -1 && !choked)
        {
            if (fabs(delta > -28.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta + 28.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta - 28.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 19.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 19.f);
                break;

            }


        }
        else if (m_side <= 1 && !choked)
        {
            int i = player->EntIndex();
            if (fabs(delta < 15.f) && !choked || !choked && g_ctx.globals.missed_shots[i] < 1)
            {

                delta = math::normalize_yaw(delta - 11.f * m_side);
            }
            else
            {

                delta = math::normalize_yaw(delta + 11.f * -m_side);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                delta = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
                break;
            case 1:
                delta = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
                break;

            }
        }

    }


}


// yaw
float MaxYawModificator(player_t* enemy)
{
    auto animstate = enemy->get_animation_state();

    if (!animstate)
        return 0.0f;

    auto speedfactor = math::clamp(animstate->m_flFeetSpeedForwardsOrSideWays, 0.0f, 1.0f);
    auto avg_speedfactor = (animstate->m_flStopToFullRunningFraction * -0.3f - 0.2f) * speedfactor + 1.0f;

    auto duck_amount = animstate->m_fDuckAmount;

    if (duck_amount)
    {
        auto max_velocity = math::clamp(animstate->m_flFeetSpeedUnknownForwardOrSideways, 0.0f, 1.0f);
        auto duck_speed = duck_amount * max_velocity;

        avg_speedfactor += duck_speed * (0.5f - avg_speedfactor);
    }

    return animstate->yaw_desync_adjustment() * avg_speedfactor;
}



void resolver::resolve_yaw()
{
    player_info_t player_info;

    if (!m_engine()->GetPlayerInfo(player->EntIndex(), &player_info))
        return;


    if (!g_ctx.local()->is_alive() || player->m_iTeamNum() == g_ctx.local()->m_iTeamNum())
        return;


    auto animstate = player->get_animation_state();
    float new_body_yaw_pose = 0.0f;
    auto m_flCurrentFeetYaw = player->get_animation_state()->m_flCurrentFeetYaw;
    auto m_flGoalFeetYaw = player->get_animation_state()->m_flGoalFeetYaw;
    auto m_flEyeYaw = player->get_animation_state()->m_flEyeYaw;
    float flMaxYawModifier = MaxYawModificator(player);
    float flMinYawModifier = player->get_animation_state()->pad10[512];
    auto delta = AngleDiff(m_flGoalFeetYaw, m_flEyeYaw);

    auto valid_lby = true;

    auto speed = player->m_vecVelocity().Length2D();

    float m_lby = player->m_flLowerBodyYawTarget();
    auto matfirst = player_record->matrixes_data.first;
    auto matsecond = player_record->matrixes_data.second;
    auto matzero = player_record->matrixes_data.zero;


    if (fabs(original_pitch) > 85.0f)
        fake = true;
    else if (!fake)
    {
        player_record->angles.y = original_goal_feet_yaw;
        return;
    }

    if (animstate->m_velocity > 0.1f || fabs(animstate->flUpVelocity) > 100.f)
        valid_lby = animstate->m_flTimeSinceStartedMoving < 0.22f;

    auto absangles = player_record->abs_angles.y + player_record->abs_angles.x;

    auto fire_first = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player);
    auto fire_second = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player);
    auto fire_third = autowall::get().wall_penetration(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player);
    auto sidefirst = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first));
    auto sidesecond = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second));
    auto sidezero = g_ctx.globals.eye_pos.DistTo(player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero));

    auto first_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.first), player, g_ctx.local());
    auto second_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.second), player, g_ctx.local());
    auto third_visible = util::visible(g_ctx.globals.eye_pos, player->hitbox_position_matrix(HITBOX_HEAD, player_record->matrixes_data.zero), player, g_ctx.local());


    auto matrix_detect_first = math::random_float(sidefirst - sidesecond, sidezero);
    auto matrix_detect_second = math::random_float(sidesecond - sidefirst, sidezero);

    auto v58 = *(float*)((uintptr_t)animstate + 0x334) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;
    auto v59 = *(float*)((uintptr_t)animstate + 0x330) * ((((*(float*)((uintptr_t)animstate + 0x11C)) * -0.30000001) - 0.19999999) * animstate->m_flFeetSpeedForwardsOrSideWays) + 1.0f;

    auto angrec = player_record->angles.y;
    if (player_record->flags & MOVETYPE_NOCLIP && player->m_fFlags() & MOVETYPE_NOCLIP)
    {
        if (delta > 30.f)
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);

            }

        }
        else
        {
            int i = player->EntIndex();
            if (g_ctx.globals.missed_shots[i] < 1)
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
            }
            else
            {
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);
            }
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f);

            }
        }
    }



    auto choked = abs(TIME_TO_TICKS(player->m_flSimulationTime() - player->m_flOldSimulationTime()) - 1);

    float m_flLastClientSideAnimationUpdateTimeDelta = 0.0f;

    auto recordangle = AngleDiff(angrec - m_flGoalFeetYaw, 360.f);

    AnimationLayer moveLayers[3][15];
    AnimationLayer layers[15];
    memcpy(moveLayers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    memcpy(layers, player->get_animlayers(), sizeof(AnimationLayer) * 15);
    int m_side;
    int updateanim;
    m_lby = (delta > 0.f) ? 1 : -1;
    bool first_detected = false;
    bool second_detected = false;

    auto diff_matrix_first = AngleDiff(fire_first.visible - fire_second.visible, fire_third.visible);
    auto diff_matrix_second = AngleDiff(fire_second.visible - fire_first.visible, fire_third.visible);


    if (player_record->flags & FL_ONGROUND && player->m_fFlags() & FL_ONGROUND) {
        if (speed < 0.1f)
        {
            auto result = player->sequence_activity(player_record->layers[3].m_nSequence);

            m_side = (delta > 0.f) ? 1 : -1;

            if (result == 979) {
                if (int(layers[3].m_flCycle != int(layers[3].m_flCycle))) {
                    if (int(layers[3].m_flWeight == 0.0f && int(layers[3].m_flCycle == 0.0f)))
                    {

                        g_ctx.globals.updating_animation = true;

                        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 60.f) * m_side;
                    }
                }
            }
        }
        else if (int(layers[12].m_flWeight < 0.01f || abs(int(layers[12].m_flWeight - (int(layers[12].m_flWeight) < 0.01f) && (int(layers[6].m_nSequence == (int(layers[6].m_nSequence))))))))
        {
            if (std::abs(layers[6].m_flWeight - layers[6].m_flWeight) < 0.01f)
            {
                float delta1 = abs(layers[6].m_flPlaybackRate - moveLayers[0][6].m_flPlaybackRate);
                float delta2 = abs(layers[6].m_flPlaybackRate - moveLayers[2][6].m_flPlaybackRate);
                float delta3 = abs(layers[6].m_flPlaybackRate - moveLayers[1][6].m_flPlaybackRate);

                if (int(delta1 * 1000.0f) < int(delta2 * 1000.0f) || int(delta3 * 1000.0f) <= int(delta2 * 1000.0f) || int(delta2 * 1000.0f))
                {
                    if (int(delta1 * 1000.0f) >= int(delta3 * 1000.0f) && int(delta2 * 1000.0f) > int(delta3 * 1000.0f) && !int(delta3 * 1000.0f))
                    {
                        g_ctx.globals.updating_animation = true;
                        m_side = 1;
                        updateanim = 1;
                    }
                }
                else
                {
                    g_ctx.globals.updating_animation = true;
                    m_side = -1;
                    updateanim = -1;
                }
            }
        }


    }
    int positives = 0;
    int negatives = 0;

    m_side = (delta > 0.f) ? 1 : -1;
    delta = -delta;
    if (delta > 30.f && matrix_detect_first != matrix_detect_second)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;

            }
        }

    }
    else if (delta < -30.f && matrix_detect_second != matrix_detect_first)
    {
        if (m_side <= 1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;

            }
        }
        else if (m_side >= -1)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
            switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
            {
            case 0:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 58.f * m_side);
                break;
            case 1:
                animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 58.f * -m_side);
                break;
            }
        }

    }
    if (choked < 1 && player_record->flags & IN_WALK)
    {
        if (delta < 15.f)
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11);
        }
        else
        {
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11);
        }
        switch (g_ctx.globals.missed_shots[player->EntIndex()] % 2)
        {
        case 0:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y - 11.f);
            break;
        case 1:
            animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + 11.f);
            break;
        }

    }
    if (player_record->bot || choked < 1)
    {
        m_lby = false;
        animstate->m_flGoalFeetYaw = math::normalize_yaw(player->m_angEyeAngles().y + original_goal_feet_yaw);
    }
}

bool resolver::ent_use_jitter(player_t* player, int* new_side) {

    if (!player->is_alive())
        return false;

    if (!player->valid(false, false))
        return false;

    if (player->IsDormant())
        return false;

    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->EntIndex();

    float CurrentAngle = player->m_angEyeAngles().y;
    if (CurrentAngle, LastAngle[i], 50.f) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? 1 : -1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = m_globals()->m_curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - m_globals()->m_curtime >= TICKS_TO_TIME(17))
            || player->m_flSimulationTime() != player->m_flOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}

float layermove()
{
    AnimationLayer m_Layer[15][2];
    float C_BaseAnimatingOverlay;
    (C_BaseAnimatingOverlay, m_Layer[0][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[0][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[1][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[2][2].m_flWeight, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_nSequence, FIELD_INTEGER),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flCycle, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flPlaybackRate, FIELD_FLOAT),
        (C_BaseAnimatingOverlay, m_Layer[3][2].m_flWeight, FIELD_FLOAT);
}

enum AnimTag_t
{
    ANIMTAG_UNINITIALIZED,
    ANIMTAG_STARTCYCLE_N,
    ANIMTAG_STARTCYCLE_NE,
    ANIMTAG_STARTCYCLE_E,
    ANIMTAG_STARTCYCLE_SE,
    ANIMTAG_STARTCYCLE_S,
    ANIMTAG_STARTCYCLE_SW,
    ANIMTAG_STARTCYCLE_W,
    ANIMTAG_STARTCYCLE_NW,
    ANIMTAG_AIMLIMIT_YAWMIN_IDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_IDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_WALK,
    ANIMTAG_AIMLIMIT_YAWMAX_WALK,
    ANIMTAG_AIMLIMIT_YAWMIN_RUN,
    ANIMTAG_AIMLIMIT_YAWMAX_RUN,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHIDLE,
    ANIMTAG_AIMLIMIT_YAWMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_YAWMAX_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMIN_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMAX_IDLE,
    ANIMTAG_AIMLIMIT_PITCHMIN_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMAX_WALKRUN,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCH,
    ANIMTAG_AIMLIMIT_PITCHMIN_CROUCHWALK,
    ANIMTAG_AIMLIMIT_PITCHMAX_CROUCHWALK,
    ANIMTAG_FLASHBANG_PASSABLE,
    ANIMTAG_WEAPON_POSTLAYER,
    ANIMTAG_MAX
};

void resolver_()
{

    int animstate;

    animstate = 128;

    if (animstate)
    {

        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 45.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 35.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 60.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) + 30.0;
        *(float*)(animstate + 0x80) = *(float*)(animstate + 128) - 30.0;

    }
    float  max_yaw = 180;

    int yaw;
    if (yaw = 180)
    {


        max_yaw;


    }


    if (yaw < 180)
    {
        max_yaw < 180;
    }
}

float resolver::resolve_pitch()
{
    return original_pitch;
    return original_pitch = 0;
}
Перенесите тему пожалуйста в раздел с приколами одноклассники крым 2014 бравл старс
 
Забаненный
Статус
Оффлайн
Регистрация
8 Июл 2021
Сообщения
45
Реакции[?]
26
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
if (player_record->flags & MOVETYPE_NOCLIP && player->m_fFlags() & MOVETYPE_NOCLIP) { if (delta > 30.f) { int i = player->EntIndex(); if (g_ctx.globals.missed_shots < 1) { animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f); } else { animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f); } switch (g_ctx.globals.missed_shots[player->EntIndex()] % 4) { case 0: animstate->m_flGoalFeetYaw = math::normalize_yaw(delta + 30.f); break; case 1: animstate->m_flGoalFeetYaw = math::normalize_yaw(delta - 30.f); }
what thefuck lol
 
Участник
Статус
Оффлайн
Регистрация
30 Дек 2020
Сообщения
400
Реакции[?]
293
Поинты[?]
1K
Если и пастишь, то оформи все хотя-бы красиво, а не куча ненужных переменных.
И еще, половина твоего кода это просто пиздец. Научись распределять нужные и ненужные функции .
Весь твой ресольвер работает только на брутфорсе и на m_side = (delta > 0.f) ? 1 : -1;
 
n00bie
Пользователь
Статус
Оффлайн
Регистрация
10 Июн 2020
Сообщения
91
Реакции[?]
43
Поинты[?]
1K
Если и пастишь, то оформи все хотя-бы красиво, а не куча ненужных переменных.
И еще, половина твоего кода это просто пиздец. Научись распределять нужные и ненужные функции .
Весь твой ресольвер работает только на брутфорсе и на m_side = (delta > 0.f) ? 1 : -1;
ты чё не обижай кодера zedt.pw и x1tle.site
 
n00bie
Пользователь
Статус
Оффлайн
Регистрация
10 Июн 2020
Сообщения
91
Реакции[?]
43
Поинты[?]
1K
Участник
Статус
Оффлайн
Регистрация
30 Дек 2020
Сообщения
400
Реакции[?]
293
Поинты[?]
1K
Сверху Снизу