-
Автор темы
- #1
Спасайте ребятки
Код:
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_t = m_cvar()->FindVar("inferno_t");
Vector2D screen_origin;
float inferno_lgbt = inferno_t->GetFloat();
auto spawn_time = TICKS_TO_TIME(inferno->m_nFireEffectTickBegin());
auto factor = (spawn_time + inferno_lgbt) - m_globals()->m_curtime;
if (factor >= 0.f) {
static auto size = Vector2D(15, 5);
float lengh = (size.x / inferno_lgbt) * factor;
render::get().rect_filled(screen_origin.x - size.x * 0.5f, screen_origin.y - size.y * 0.5f, size.x, size.y, Color(0, 0, 0, g_cfg.esp.molotov_timer_color.a()));
}
}