Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

C++ Lw fix fakeduck accuracy

  • Автор темы Автор темы kazix
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
10 Авг 2021
Сообщения
9
Реакции
4
C++:
Expand Collapse Copy
Vector player_t::get_shoot_position()
{
    if (!this) //-V704
        return ZERO;

    auto shoot_position = m_vecOrigin() + m_vecViewOffset();

    if (this != g_ctx.local()) //-V648
        return shoot_position;

    if (g_ctx.globals.fakeducking)
    {
        Vector origin = m_vecOrigin();

        Vector vDuckHullMin = m_gamemovement()->GetPlayerMins(true);
        Vector vStandHullMin = m_gamemovement()->GetPlayerMins(false);

        float fMore = (vDuckHullMin.z - vStandHullMin.z);

        Vector vecDuckViewOffset = m_gamemovement()->GetPlayerViewOffset(true);
        Vector vecStandViewOffset = m_gamemovement()->GetPlayerViewOffset(false);
        float duckFraction = m_flDuckAmount();

        float tempz = ((vecDuckViewOffset.z - fMore) * duckFraction) +
            (vecStandViewOffset.z * (1 - duckFraction));

        origin.z += tempz;

        return origin;
    }

    modify_eye_position(shoot_position);
    return shoot_position;
}
 
C++:
Expand Collapse Copy
Vector player_t::get_shoot_position()
{
    if (!this) //-V704
        return ZERO;

    auto shoot_position = m_vecOrigin() + m_vecViewOffset();

    if (this != g_ctx.local()) //-V648
        return shoot_position;

    if (g_ctx.globals.fakeducking)
    {
        Vector origin = m_vecOrigin();

        Vector vDuckHullMin = m_gamemovement()->GetPlayerMins(true);
        Vector vStandHullMin = m_gamemovement()->GetPlayerMins(false);

        float fMore = (vDuckHullMin.z - vStandHullMin.z);

        Vector vecDuckViewOffset = m_gamemovement()->GetPlayerViewOffset(true);
        Vector vecStandViewOffset = m_gamemovement()->GetPlayerViewOffset(false);
        float duckFraction = m_flDuckAmount();

        float tempz = ((vecDuckViewOffset.z - fMore) * duckFraction) +
            (vecStandViewOffset.z * (1 - duckFraction));

        origin.z += tempz;

        return origin;
    }

    modify_eye_position(shoot_position);
    return shoot_position;
}
Извините, но я осмелюсь спросить,
а что именно ты этим пофиксил? :roflanzdarova:
 
C++:
Expand Collapse Copy
Vector player_t::get_shoot_position()
{
    if (!this) //-V704
        return ZERO;

    auto shoot_position = m_vecOrigin() + m_vecViewOffset();

    if (this != g_ctx.local()) //-V648
        return shoot_position;

    if (g_ctx.globals.fakeducking)
    {
        Vector origin = m_vecOrigin();

        Vector vDuckHullMin = m_gamemovement()->GetPlayerMins(true);
        Vector vStandHullMin = m_gamemovement()->GetPlayerMins(false);

        float fMore = (vDuckHullMin.z - vStandHullMin.z);

        Vector vecDuckViewOffset = m_gamemovement()->GetPlayerViewOffset(true);
        Vector vecStandViewOffset = m_gamemovement()->GetPlayerViewOffset(false);
        float duckFraction = m_flDuckAmount();

        float tempz = ((vecDuckViewOffset.z - fMore) * duckFraction) +
            (vecStandViewOffset.z * (1 - duckFraction));

        origin.z += tempz;

        return origin;
    }

    modify_eye_position(shoot_position);
    return shoot_position;
}
where would u call this btw?
 
C++:
Expand Collapse Copy
Vector player_t::get_shoot_position()
{
    if (!this) //-V704
        return ZERO;

    auto shoot_position = m_vecOrigin() + m_vecViewOffset();

    if (this != g_ctx.local()) //-V648
        return shoot_position;

    if (g_ctx.globals.fakeducking)
    {
        Vector origin = m_vecOrigin();

        Vector vDuckHullMin = m_gamemovement()->GetPlayerMins(true);
        Vector vStandHullMin = m_gamemovement()->GetPlayerMins(false);

        float fMore = (vDuckHullMin.z - vStandHullMin.z);

        Vector vecDuckViewOffset = m_gamemovement()->GetPlayerViewOffset(true);
        Vector vecStandViewOffset = m_gamemovement()->GetPlayerViewOffset(false);
        float duckFraction = m_flDuckAmount();

        float tempz = ((vecDuckViewOffset.z - fMore) * duckFraction) +
            (vecStandViewOffset.z * (1 - duckFraction));

        origin.z += tempz;

        return origin;
    }

    modify_eye_position(shoot_position);
    return shoot_position;
}
зачем лв в енрейдж превращать?
 
could someone help with this error?
1628703880729.png
 
Назад
Сверху Снизу