Вопрос Какие значение лучше всего поставить resolver (weave)

Забаненный
Статус
Оффлайн
Регистрация
14 Сен 2020
Сообщения
63
Реакции[?]
2
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Код:
std::string ResolverMode[65];
int last_ticks[65];
int IBasePlayer::GetChokedPackets() {
    auto ticks = TIME_TO_TICKS(GetSimulationTime() - GetOldSimulationTime());
    if (ticks == 0 && last_ticks[GetIndex()] > 0) {
        return last_ticks[GetIndex()] - 1;
    }
    else {
        last_ticks[GetIndex()] = ticks;
        return ticks;
    }
}

float CResolver::GetAngle(IBasePlayer* player) {
    return Math::NormalizeYaw(player->GetEyeAngles().y);
}

float CResolver::GetForwardYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(GetBackwardYaw(player) - 180.f);
}

float CResolver::GetBackwardYaw(IBasePlayer* player) {
    return Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y;
}

float CResolver::GetLeftYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y - 50.f);
}

float CResolver::GetRightYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y + 50.f);
}
bool CResolver::TargetJitter(IBasePlayer* player, bool v2) {
    float yaw = v2 ? GetRightYaw(player) : GetLeftYaw(player);
    return fabsf(GetAngle(player) - Math::NormalizeYaw(yaw + 35.f))
        >= fabsf(GetAngle(player) - Math::NormalizeYaw(yaw - 35.f));
}
bool CResolver::TargetSide(IBasePlayer* player) {
    float yaw = Math::NormalizeYaw(GetBackwardYaw(player));
    float angle = GetAngle(player);
    return fabsf(angle - Math::NormalizeYaw(yaw + 100.f))
        >= fabsf(angle - Math::NormalizeYaw(yaw - 100.f));
}

//test
float AngleMod(float a)
{
    return (360.f / 65536) * ((int)(a * (65536.f / 360.0f)) & 65535);
}

float ApproachAngle(float target, float value, float speed)
{
    target = AngleMod(target);
    value = AngleMod(value);

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180)
        delta += 360;
    else if (delta > 180)
        delta -= 360;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

//test2




//1

//1
void CResolver::DetectSide(IBasePlayer* player, int* side)
{
    Vector src3D, dst3D, forward, right, up, src, dst;
    float back_two, right_two, left_two;
    trace_t tr;
    Ray_t ray, ray2, ray3, ray4, ray5, ray6, ray7;
    CTraceFilter filter;

    Math::AngleVectors(Vector(0, GetBackwardYaw(player), 0), &forward, &right, &up);

    filter.pSkip = player;
    src3D = player->GetEyePosition();
    dst3D = src3D + (forward * 381); //Might want to experiment with other numbers, incase you don't know what the number does, its how far the trace will go. Lower = shorter.

    ray.Init(src3D, dst3D);
    interfaces.trace->TraceRay(ray, MASK_SHOT, &filter, &tr);
    back_two = (tr.endpos - tr.startpos).Length();

    ray2.Init(src3D + right * 30, dst3D + right * 30);
    interfaces.trace->TraceRay(ray2, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray3.Init(src3D - right * 58, dst3D - right * 58);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    left_two = (tr.endpos - tr.startpos).Length();

    ray4.Init(src3D - right * 90, dst3D - right * 90);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray5.Init(src3D - right * 30, dst3D - right * 30);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray6.Init(src3D - right * 30, dst3D - right * 30);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    left_two = (tr.endpos - tr.startpos).Length();

    ray7.Init(src3D + right * 90, dst3D + right * 90);
    interfaces.trace->TraceRay(ray, MASK_SHOT, &filter, &tr);
    back_two = (tr.endpos - tr.startpos).Length();

    if (left_two > right_two) {
        *side = 1;
        //Body should be right
    }
    else if (right_two > left_two) {
        *side = -1;
    }
    else
        *side = 0;
}



bool CResolver::DoesHaveJitter(IBasePlayer* player, int* new_side) {
    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->GetIndex();

    float CurrentAngle = player->GetEyeAngles().y;
    if (!Math::IsNearEqual(CurrentAngle, LastAngle[i], 70.f)) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? -1 : 1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = interfaces.global_vars->curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - interfaces.global_vars->curtime >= TICKS_TO_TIME(17))
            || player->GetSimulationTime() != player->GetOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}
//kaka

float get_max_desync_delta(IBasePlayer* player) {

      auto animstate = player->GetPlayerAnimState();

    float rate = 180;
    float duckammount = *(float*)(animstate + 0xA4);
    float speedfraction = max(0, min(*reinterpret_cast<float*>(animstate + 0xF8), 1));

    float speedfactor = max(0, min(1, *reinterpret_cast<float*> (animstate + 0xFC)));

    float unk1 = ((*reinterpret_cast<float*> (animstate + 0x11C) * -0.30000001) - 0.19999999) * speedfraction;
    float unk2 = unk1 + 1.f;
    float unk3;

    if (duckammount > 0) {

        unk2 += ((duckammount * speedfactor) * (0.5f - unk2));

    }

    unk3 = *(float*)(animstate + 0x334) * unk2;

    return rate;
}

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

//mega fix aa
void CResolver::Do(IBasePlayer* player)
{
    auto animstate = player->GetPlayerAnimState();
    if (!animstate)
        return;

    animstate->m_flGoalFeetYaw = GetAngle(player);

    if (!vars.ragebot.resolver)
        return;
    if (!csgo->local->isAlive())
        return;
    if (player->GetChokedPackets() <= 1)
        return;

    int idx = player->GetIndex();

    if (player->GetPlayerInfo().fakeplayer)
        return;

    if (!(player->GetFlags() & FL_ONGROUND))
        return;
    float angle = GetAngle(player);
    {
        DetectSide(player, &FreestandSide[idx]);

        bool forward = fabsf(Math::NormalizeYaw(GetAngle(player) - GetForwardYaw(player))) < 58.f;
        if (csgo->missedshots[idx] == 0) {
            ResolverMode[idx] = hs::C.s();

            if (forward) {
                FreestandSide[idx] *= -1;
                ResolverMode[idx] += hs::B.s();
            }
            else
                ResolverMode[idx] += hs::A.s();
            animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f * FreestandSide[idx]);
        }
        else
        {
            if (forward)
            {
                switch (csgo->missedshots[idx] % 2) {
                case 1:
                    ResolverMode[idx] = hs::DA.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                case 0:
                    ResolverMode[idx] = hs::DB.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                }
            }
            else {
                switch (csgo->missedshots[idx] % 2)
                {
                case 1:
                    ResolverMode[idx] = hs::DA.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                case 0:
                    ResolverMode[idx] = hs::DB.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                }
            }
        }
    }

    animstate->m_flGoalFeetYaw = Math::NormalizeYaw(animstate->m_flGoalFeetYaw);
}
 
▃ ▄ ▅ ▆ ▇ █ █ ▇ ▆ ▅ ▄ ▃
Забаненный
Статус
Оффлайн
Регистрация
29 Дек 2020
Сообщения
264
Реакции[?]
158
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Проводи тесты, возможно найдешь суперское значение)
 
main public enemy
Эксперт
Статус
Оффлайн
Регистрация
30 Ноя 2019
Сообщения
1,531
Реакции[?]
647
Поинты[?]
0
Киньте ему SetupVelocity пж..
Quality.win
Ревёрс сетап велосити в данный момент ему нихуя не даст, у чела банально нету необходимых знаний в c++.
Да и углы у него 58 стоят, я не знаю что он там менять в них хочет...
Код:
std::string ResolverMode[65];
int last_ticks[65];
int IBasePlayer::GetChokedPackets() {
    auto ticks = TIME_TO_TICKS(GetSimulationTime() - GetOldSimulationTime());
    if (ticks == 0 && last_ticks[GetIndex()] > 0) {
        return last_ticks[GetIndex()] - 1;
    }
    else {
        last_ticks[GetIndex()] = ticks;
        return ticks;
    }
}

float CResolver::GetAngle(IBasePlayer* player) {
    return Math::NormalizeYaw(player->GetEyeAngles().y);
}

float CResolver::GetForwardYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(GetBackwardYaw(player) - 180.f);
}

float CResolver::GetBackwardYaw(IBasePlayer* player) {
    return Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y;
}

float CResolver::GetLeftYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y - 50.f);
}

float CResolver::GetRightYaw(IBasePlayer* player) {
    return Math::NormalizeYaw(Math::CalculateAngle(csgo->local->GetOrigin(), player->GetOrigin()).y + 50.f);
}
bool CResolver::TargetJitter(IBasePlayer* player, bool v2) {
    float yaw = v2 ? GetRightYaw(player) : GetLeftYaw(player);
    return fabsf(GetAngle(player) - Math::NormalizeYaw(yaw + 35.f))
        >= fabsf(GetAngle(player) - Math::NormalizeYaw(yaw - 35.f));
}
bool CResolver::TargetSide(IBasePlayer* player) {
    float yaw = Math::NormalizeYaw(GetBackwardYaw(player));
    float angle = GetAngle(player);
    return fabsf(angle - Math::NormalizeYaw(yaw + 100.f))
        >= fabsf(angle - Math::NormalizeYaw(yaw - 100.f));
}

//test
float AngleMod(float a)
{
    return (360.f / 65536) * ((int)(a * (65536.f / 360.0f)) & 65535);
}

float ApproachAngle(float target, float value, float speed)
{
    target = AngleMod(target);
    value = AngleMod(value);

    float delta = target - value;

    // Speed is assumed to be positive
    if (speed < 0)
        speed = -speed;

    if (delta < -180)
        delta += 360;
    else if (delta > 180)
        delta -= 360;

    if (delta > speed)
        value += speed;
    else if (delta < -speed)
        value -= speed;
    else
        value = target;

    return value;
}

//test2




//1

//1
void CResolver::DetectSide(IBasePlayer* player, int* side)
{
    Vector src3D, dst3D, forward, right, up, src, dst;
    float back_two, right_two, left_two;
    trace_t tr;
    Ray_t ray, ray2, ray3, ray4, ray5, ray6, ray7;
    CTraceFilter filter;

    Math::AngleVectors(Vector(0, GetBackwardYaw(player), 0), &forward, &right, &up);

    filter.pSkip = player;
    src3D = player->GetEyePosition();
    dst3D = src3D + (forward * 381); //Might want to experiment with other numbers, incase you don't know what the number does, its how far the trace will go. Lower = shorter.

    ray.Init(src3D, dst3D);
    interfaces.trace->TraceRay(ray, MASK_SHOT, &filter, &tr);
    back_two = (tr.endpos - tr.startpos).Length();

    ray2.Init(src3D + right * 30, dst3D + right * 30);
    interfaces.trace->TraceRay(ray2, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray3.Init(src3D - right * 58, dst3D - right * 58);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    left_two = (tr.endpos - tr.startpos).Length();

    ray4.Init(src3D - right * 90, dst3D - right * 90);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray5.Init(src3D - right * 30, dst3D - right * 30);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    right_two = (tr.endpos - tr.startpos).Length();

    ray6.Init(src3D - right * 30, dst3D - right * 30);
    interfaces.trace->TraceRay(ray3, MASK_SHOT, &filter, &tr);
    left_two = (tr.endpos - tr.startpos).Length();

    ray7.Init(src3D + right * 90, dst3D + right * 90);
    interfaces.trace->TraceRay(ray, MASK_SHOT, &filter, &tr);
    back_two = (tr.endpos - tr.startpos).Length();

    if (left_two > right_two) {
        *side = 1;
        //Body should be right
    }
    else if (right_two > left_two) {
        *side = -1;
    }
    else
        *side = 0;
}



bool CResolver::DoesHaveJitter(IBasePlayer* player, int* new_side) {
    static float LastAngle[64];
    static int LastBrute[64];
    static bool Switch[64];
    static float LastUpdateTime[64];

    int i = player->GetIndex();

    float CurrentAngle = player->GetEyeAngles().y;
    if (!Math::IsNearEqual(CurrentAngle, LastAngle[i], 70.f)) {
        Switch[i] = !Switch[i];
        LastAngle[i] = CurrentAngle;
        *new_side = Switch[i] ? -1 : 1;
        LastBrute[i] = *new_side;
        LastUpdateTime[i] = interfaces.global_vars->curtime;
        return true;
    }
    else {
        if (fabsf(LastUpdateTime[i] - interfaces.global_vars->curtime >= TICKS_TO_TIME(17))
            || player->GetSimulationTime() != player->GetOldSimulationTime()) {
            LastAngle[i] = CurrentAngle;
        }
        *new_side = LastBrute[i];
    }
    return false;
}
//kaka

float get_max_desync_delta(IBasePlayer* player) {

      auto animstate = player->GetPlayerAnimState();

    float rate = 180;
    float duckammount = *(float*)(animstate + 0xA4);
    float speedfraction = max(0, min(*reinterpret_cast<float*>(animstate + 0xF8), 1));

    float speedfactor = max(0, min(1, *reinterpret_cast<float*> (animstate + 0xFC)));

    float unk1 = ((*reinterpret_cast<float*> (animstate + 0x11C) * -0.30000001) - 0.19999999) * speedfraction;
    float unk2 = unk1 + 1.f;
    float unk3;

    if (duckammount > 0) {

        unk2 += ((duckammount * speedfactor) * (0.5f - unk2));

    }

    unk3 = *(float*)(animstate + 0x334) * unk2;

    return rate;
}

template<class T, class U>
inline T clamp(T in, U low, U high)
{
    if (in <= low)
        return low;
    else if (in >= high)
        return high;
    else
        return in;
}

//mega fix aa
void CResolver::Do(IBasePlayer* player)
{
    auto animstate = player->GetPlayerAnimState();
    if (!animstate)
        return;

    animstate->m_flGoalFeetYaw = GetAngle(player);

    if (!vars.ragebot.resolver)
        return;
    if (!csgo->local->isAlive())
        return;
    if (player->GetChokedPackets() <= 1)
        return;

    int idx = player->GetIndex();

    if (player->GetPlayerInfo().fakeplayer)
        return;

    if (!(player->GetFlags() & FL_ONGROUND))
        return;
    float angle = GetAngle(player);
    {
        DetectSide(player, &FreestandSide[idx]);

        bool forward = fabsf(Math::NormalizeYaw(GetAngle(player) - GetForwardYaw(player))) < 58.f;
        if (csgo->missedshots[idx] == 0) {
            ResolverMode[idx] = hs::C.s();

            if (forward) {
                FreestandSide[idx] *= -1;
                ResolverMode[idx] += hs::B.s();
            }
            else
                ResolverMode[idx] += hs::A.s();
            animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f * FreestandSide[idx]);
        }
        else
        {
            if (forward)
            {
                switch (csgo->missedshots[idx] % 2) {
                case 1:
                    ResolverMode[idx] = hs::DA.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                case 0:
                    ResolverMode[idx] = hs::DB.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                }
            }
            else {
                switch (csgo->missedshots[idx] % 2)
                {
                case 1:
                    ResolverMode[idx] = hs::DA.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                case 0:
                    ResolverMode[idx] = hs::DB.s();
                    if (FreestandSide[idx] == 1)
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle - 58.f));
                    else if
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle));
                    else
                        (animstate->m_flGoalFeetYaw = Math::NormalizeYaw(angle + 58.f));
                    break;
                }
            }
        }
    }

    animstate->m_flGoalFeetYaw = Math::NormalizeYaw(animstate->m_flGoalFeetYaw);
}
Лично я делаю 60, и мне похуй
 
Участник
Статус
Оффлайн
Регистрация
27 Фев 2019
Сообщения
1,123
Реакции[?]
391
Поинты[?]
46K
Ревёрс сетап велосити в данный момент ему нихуя не даст, у чела банально нету необходимых знаний в c++.
Да и углы у него 58 стоят, я не знаю что он там менять в них хочет...

Лично я делаю 60, и мне похуй
Я и говорил про значения 58-60. Про челик даже не понимает не то, что C++, математику не понимает. +- 90.
 
Забаненный
Статус
Оффлайн
Регистрация
15 Апр 2021
Сообщения
5
Реакции[?]
1
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Эксперт
Статус
Оффлайн
Регистрация
30 Дек 2019
Сообщения
1,970
Реакции[?]
958
Поинты[?]
19K
ну вместо 58 и -58 ставить auto delta = Math::NormalizeYaw(player->EyeAngles().y - animstate->m_flGoalFeetYaw);
и юзать как delta, -delta
 
main public enemy
Эксперт
Статус
Оффлайн
Регистрация
30 Ноя 2019
Сообщения
1,531
Реакции[?]
647
Поинты[?]
0
Сверху Снизу