Исходник Alternate Way of Fixing LandFall for Supremacy (legacy)

Начинающий
Статус
Оффлайн
Регистрация
22 Сен 2018
Сообщения
25
Реакции[?]
5
Поинты[?]
3K
lby seems to be popular again and if anyone's trying to paste here's just more code available for supremacy, this is used before any velocity modifications in updateanimations inside of aimbot.cpp.

LandFall:
 state->m_bOnGround = (m_player->m_fFlags() & FL_ONGROUND);

    bool bPreviousGroundState = state->m_bOnGround;

    float flDistanceFell = 0.f;
    float m_flLeftGroundHeight = 0.f;

    bool m_bLandedOnGroundThisFrame = (bPreviousGroundState != state->m_bOnGround && state->m_bOnGround);
    bool m_bLefttheGroundThisFrame = (bPreviousGroundState != state->m_bOnGround && !state->m_bOnGround);

    if (m_bLefttheGroundThisFrame)
    {
        m_flLeftGroundHeight = record->m_origin.z;
    }

    if (m_bLandedOnGroundThisFrame)
    {
        m_flLeftGroundHeight = abs(m_flLeftGroundHeight - m_player->m_vecOrigin().z);
        float flDistanceFallNormalizedBiasRange = math::Bias(math::SimpleSplineRemapValClamped(flDistanceFell, 12.0f, 72.0f, 0.0f, 1.0f), 0.4f);

        state->m_flLandAnimMultiplier = std::clamp(math::Bias(state->m_flDurationInAir, 0.3f), 0.1f, 1.0f);
        state->m_flDuckAdditional = std::max(state->m_flLandAnimMultiplier, flDistanceFallNormalizedBiasRange);
    }
    else
    {
        state->m_flDuckAdditional = math::ApproachAngle(0, state->m_flDuckAdditional, state->m_flLastUpdateIncrement * 2);
    }

    state->m_flInAirSmoothValue = math::ApproachAngle(state->m_bOnGround ? 1 : 0, state->m_flInAirSmoothValue, math::Lerp(state->m_flAnimDuckAmount, 8.f, 16.f) * state->m_flLastUpdateIncrement);
    math::clamp(state->m_flInAirSmoothValue, 0.f, 1.f);
 
retard
Пользователь
Статус
Оффлайн
Регистрация
13 Мар 2021
Сообщения
367
Реакции[?]
67
Поинты[?]
10K
Theres sure are other good ways to do this, but this is not a bad way to do it (assuming this is from the game src )
 
Последнее редактирование:
Начинающий
Статус
Оффлайн
Регистрация
22 Сен 2018
Сообщения
25
Реакции[?]
5
Поинты[?]
3K
Theres sure are other good ways to do this, but this is not a bad way to do it (assuming this is from the game src)
Yeah, just going over game source etc from the '18 leak and converting for everyone for supremacy pasting, isn't 100% copy/paste ready but anyone with enough braincells should be able to make it work
 
Сверху Снизу