Lby update ( Soufiw не бей )

BlazeHack Owner
Участник
Статус
Оффлайн
Регистрация
12 Сен 2016
Сообщения
364
Реакции[?]
210
Поинты[?]
0
В каком сурсе более подходящий lby update для десинков ( чтобы он их мгновенно рассинхронизировал ) ?
 
пастер века
Забаненный
Статус
Оффлайн
Регистрация
18 Янв 2019
Сообщения
91
Реакции[?]
15
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
aimware.idb :LUL:
 
push me to the edge
Олдфаг
Статус
Оффлайн
Регистрация
22 Мар 2017
Сообщения
2,253
Реакции[?]
1,204
Поинты[?]
1K
C++:
void AntiAim::UpdateLBYBreaker(CUserCmd *usercmd)
{
    bool
        allocate = (m_serverAnimState == nullptr),
        change = (!allocate) && (&g_LocalPlayer->GetRefEHandle() != m_ulEntHandle),
        reset = (!allocate && !change) && (g_LocalPlayer->m_flSpawnTime() != m_flSpawnTime);

    // player changed, free old animation state.
    if (change)
        g_pMemAlloc->Free(m_serverAnimState);

    // need to reset? (on respawn)
    if (reset)
    {
        // reset animation state.
        C_BasePlayer::ResetAnimationState(m_serverAnimState);

        // note new spawn time.
        m_flSpawnTime = g_LocalPlayer->m_flSpawnTime();
    }

    // need to allocate or create new due to player change.
    if (allocate || change)
    {
        // only works with games heap alloc.
        C_CSGOPlayerAnimState *state = (C_CSGOPlayerAnimState*)g_pMemAlloc->Alloc(sizeof(C_CSGOPlayerAnimState));

        if (state != nullptr)
            g_LocalPlayer->CreateAnimationState(nullptr);

        // used to detect if we need to recreate / reset.
        m_ulEntHandle = const_cast<CBaseHandle*>(&g_LocalPlayer->GetRefEHandle());
        m_flSpawnTime = g_LocalPlayer->m_flSpawnTime();

        // note anim state for future use.
        m_serverAnimState = state;
    }

    float_t curtime = TICKS_TO_TIME(AimRage::Get().GetTickbase() + 11.f);
    if (!g_ClientState->chokedcommands && m_serverAnimState)
    {
        C_BasePlayer::UpdateAnimationState(m_serverAnimState, usercmd->viewangles);

        // calculate delta.
        float_t delta = std::abs(Math::ClampYaw(usercmd->viewangles.yaw - g_LocalPlayer->m_flLowerBodyYawTarget()));

        // walking, delay next update by 1.1s.
        if (m_serverAnimState->m_flVelocity() > 0.1f && (g_LocalPlayer->m_fFlags() & FL_ONGROUND))
            m_flNextBodyUpdate = curtime + g_LocalPlayer->m_flSimulationTime() + 1.1f;

        else if (curtime >= m_flNextBodyUpdate)
        {
            if (delta > (M_PI / 180 - m_flNextBodyUpdate) * 0.35f)
                ; // server will update lby.

            m_flNextBodyUpdate = curtime + g_LocalPlayer->m_flSimulationTime() + 0.22f;
        }
    }

    // if was jumping and then onground and bsendpacket true, we're gonna update.
    m_bBreakLowerBody = (g_LocalPlayer->m_fFlags() & FL_ONGROUND) && ((m_flNextBodyUpdate - curtime) <= g_GlobalVars->interval_per_tick);
}
соу фи одобрил
 
НАЧНИ ПРОГРАММИРОВАТЬ ПРЯМО СЕЙЧАС
Участник
Статус
Оффлайн
Регистрация
19 Июн 2017
Сообщения
608
Реакции[?]
924
Поинты[?]
4K
тсс не пали
к сведению, у поляка этот лбу брейкер работает максимально хуево, поэтому он и наделал костылей в десинках с DesyncRotate

C++:
void AntiAim::UpdateLBYBreaker(CUserCmd *usercmd)
{
    bool
        allocate = (m_serverAnimState == nullptr),
        change = (!allocate) && (&g_LocalPlayer->GetRefEHandle() != m_ulEntHandle),
        reset = (!allocate && !change) && (g_LocalPlayer->m_flSpawnTime() != m_flSpawnTime);

    // player changed, free old animation state.
    if (change)
        g_pMemAlloc->Free(m_serverAnimState);

    // need to reset? (on respawn)
    if (reset)
    {
        // reset animation state.
        C_BasePlayer::ResetAnimationState(m_serverAnimState);

        // note new spawn time.
        m_flSpawnTime = g_LocalPlayer->m_flSpawnTime();
    }

    // need to allocate or create new due to player change.
    if (allocate || change)
    {
        // only works with games heap alloc.
        C_CSGOPlayerAnimState *state = (C_CSGOPlayerAnimState*)g_pMemAlloc->Alloc(sizeof(C_CSGOPlayerAnimState));

        if (state != nullptr)
            g_LocalPlayer->CreateAnimationState(nullptr);

        // used to detect if we need to recreate / reset.
        m_ulEntHandle = const_cast<CBaseHandle*>(&g_LocalPlayer->GetRefEHandle());
        m_flSpawnTime = g_LocalPlayer->m_flSpawnTime();

        // note anim state for future use.
        m_serverAnimState = state;
    }

    float_t curtime = TICKS_TO_TIME(AimRage::Get().GetTickbase() + 11.f);
    if (!g_ClientState->chokedcommands && m_serverAnimState)
    {
        C_BasePlayer::UpdateAnimationState(m_serverAnimState, usercmd->viewangles);

        // calculate delta.
        float_t delta = std::abs(Math::ClampYaw(usercmd->viewangles.yaw - g_LocalPlayer->m_flLowerBodyYawTarget()));

        // walking, delay next update by 1.1s.
        if (m_serverAnimState->m_flVelocity() > 0.1f && (g_LocalPlayer->m_fFlags() & FL_ONGROUND))
            m_flNextBodyUpdate = curtime + g_LocalPlayer->m_flSimulationTime() + 1.1f;

        else if (curtime >= m_flNextBodyUpdate)
        {
            if (delta > (M_PI / 180 - m_flNextBodyUpdate) * 0.35f)
                ; // server will update lby.

            m_flNextBodyUpdate = curtime + g_LocalPlayer->m_flSimulationTime() + 0.22f;
        }
    }

    // if was jumping and then onground and bsendpacket true, we're gonna update.
    m_bBreakLowerBody = (g_LocalPlayer->m_fFlags() & FL_ONGROUND) && ((m_flNextBodyUpdate - curtime) <= g_GlobalVars->interval_per_tick);
}
соу фи одобрил
ооооо годнота подъехала :seemsgood:
не забудь выкинуть две лишние кости когда делаешь сетап боунс, иначе лбу предикшен будет некорректным!11! ( https://yougame.biz/threads/73598/#post-707650 )
 
Последнее редактирование:
Сверху Снизу