C++ Исходник Molotov Radius (Baimloss Like)

Пользователь
Статус
Оффлайн
Регистрация
18 Май 2020
Сообщения
188
Реакции[?]
71
Поинты[?]
0
[Osiris say hello]

Код:
void world_visuals::MolotovHull(c_inferno* inferno, ImDrawList* list)
{
    static const auto flameCircumference = [] {
        std::array<vec3_t, 72> points;
        for (std::size_t i = 0; i < points.size(); ++i) {
            constexpr auto flameRadius = 60.0f;
            points[i] = vec3_t{ flameRadius * std::cos(DEG2RAD(i * (360.0f / points.size()))),
                                flameRadius * std::sin(DEG2RAD(i * (360.0f / points.size()))),
                                0.0f };
        }
        return points;
    }();

    std::vector<vec3_t> points;
    auto origin = inferno->get_abs_origin();

    points.reserve(inferno->fireCount());
    for (int i = 0; i < inferno->fireCount(); ++i) {
        if (inferno->fireIsBurning()[i])
            points.emplace_back(inferno->get_fire_x_delta()[i] + origin.x, inferno->get_fire_y_delta()[i] + origin.y, inferno->get_fire_z_delta()[i] + origin.z);
    }

    for (const auto& pos : points) {
        std::array<ImVec2, flameCircumference.size()> screenPoints;
        std::size_t count = 0;

        for (const auto& point : flameCircumference) {
            if (D::WorldToScreen(pos + point, screenPoints[count]))
                ++count;
        }

        if (count < 1)
            continue;

        std::swap(screenPoints[0], *std::min_element(screenPoints.begin(), screenPoints.begin() + count, [](const auto& a, const auto& b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }));

        constexpr auto orientation = [](const ImVec2& a, const ImVec2& b, const ImVec2& c) {
            return (b.x - a.x) * (c.y - a.y) - (c.x - a.x) * (b.y - a.y);
        };

        std::sort(screenPoints.begin() + 1, screenPoints.begin() + count, [&](const auto& a, const auto& b) { return orientation(screenPoints[0], a, b) > 0.0f; });
        list->AddConvexPolyFilled(screenPoints.data(), count, ImColor(1.f, 0.f, 0.f, 0.5f));
    }
}

Код:
    ANETVAR( get_fire_x_delta( ), int, 100, "CInferno->m_fireXDelta" )
    ANETVAR( get_fire_y_delta( ), int, 100, "CInferno->m_fireYDelta" )
    ANETVAR( get_fire_z_delta( ), int, 100, "CInferno->m_fireZDelta" )
    ANETVAR(fireIsBurning( ), bool, 100, "CInferno->m_bFireIsBurning" )
    NETVAR(fireCount(), int, "CInferno->m_fireCount");
 

Вложения

Участник
Статус
Оффлайн
Регистрация
6 Сен 2020
Сообщения
749
Реакции[?]
364
Поинты[?]
8K
ye dummy, im not even talking to you. i've seen a lot of shitposts but this one is the greatest shitpost of all time, i saw people posting their lw resolvers but just copying and pasting osiris functions? lmaoooo
 
Пользователь
Статус
Оффлайн
Регистрация
18 Май 2020
Сообщения
188
Реакции[?]
71
Поинты[?]
0
ye dummy, im not even talking to you. i've seen a lot of shitposts but this one is the greatest shitpost of all time, i saw people posting their lw resolvers but just copying and pasting osiris functions? lmaoooo
why not? better than pasting lw and posting shit functions to lw
 
EVOLUTION ?
Забаненный
Статус
Оффлайн
Регистрация
30 Июл 2019
Сообщения
1,162
Реакции[?]
269
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
1622824212578.png
no comments...
 
Сверху Снизу