- Статус
- Оффлайн
- Регистрация
- 18 Янв 2021
- Сообщения
- 88
- Реакции
- 8
Проблема с кругами в лв я думаю все пофиксили но я тоже вроде как пофиксил и не использовал круги сейчас попробовал и ахуе*
Render :
И сам render timer molotov :
Render :
Код:
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
auto prevScreenPos = ZERO;
auto step = M_PI * 2.0f / 72.0f;
auto screenPos = ZERO;
auto screen = ZERO;
if (!math::world_to_screen(origin, screen))
return;
for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step)
{
Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);
if (math::world_to_screen(pos, screenPos))
{
if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
{
line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
}
prevScreenPos = screenPos;
}
}
}
И сам render timer molotov :
Код:
void worldesp::molotov_timer(entity_t* entity)
{
if (!g_cfg.esp.molotov_timer)
return;
auto inferno = reinterpret_cast<inferno_t*>(entity);
auto origin = inferno->GetAbsOrigin();
if (entity->GetClientClass()->m_ClassID == CInferno) {
auto inferno = reinterpret_cast<inferno_t*>(entity);
Vector mins, maxs;
inferno->GetClientRenderable()->GetRenderBounds(mins, maxs);
//render::get().Draw3DFilledCircle(entity->m_vecOrigin(), Vector(maxs - mins).Length2D() * 0.5, g_cfg.esp.molotov_timer_color);
}
static auto inferno_pizdec_lgbt = m_cvar()->FindVar(crypt_str("inferno_max_range"));
Vector screen_origin;
if (!math::world_to_screen(origin, screen_origin))
return;
auto spawn_time = inferno->get_spawn_time();
auto factor = (spawn_time + inferno_t::get_expiry_time() - m_globals()->m_curtime) / inferno_t::get_expiry_time();
static auto size = Vector2D(35.0f, 5.0f);
render::get().circle_filled(screen_origin.x, screen_origin.y - size.y * 0.5f, 60, 20, Color(15, 15, 15, 187));
render::get().draw_arc(screen_origin.x, screen_origin.y - size.y * 0.5f, 20, -90, (360 * factor), 2, (15, 15, 15, Color(255, 255, 255)));
render::get().text(fonts[GRENADES], screen_origin.x + 1.0f, screen_origin.y - size.y * 0.5f + 2.0f, Color(255, 255, 255), HFONT_CENTERED_X | HFONT_CENTERED_Y, "l");
}