-
Автор темы
- #1
You can easily customize this to your liking
world_visuals.cpp
draw_manager.cpp
draw_manager.h
world_visuals.cpp
C++:
void worldesp :: smoke_timer (entity_t * entity)
{
if (! g_cfg.esp.smoke_timer)
return;
auto smoke = reinterpret_cast <smoke_t *> (entity);
if (! smoke-> m_nSmokeEffectTickBegin () ||! smoke-> m_bDidSmokeEffect ())
return;
auto origin = smoke-> GetAbsOrigin ();
Vector screen_origin;
if (! math :: world_to_screen (origin, screen_origin))
return;
auto spawn_time = TICKS_TO_TIME (smoke-> m_nSmokeEffectTickBegin ());
auto factor = (spawn_time + smoke_t :: get_expiry_time () - m_globals () -> m_curtime) / smoke_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 (). CircularProgressBar (screen_origin.x, screen_origin.y - size.y * 0.5f, 17, 20, 0, 360 * factor, Color (255, 255, 255, 187), true);
//render::get().Draw3DRainbowCircle1(screen_origin.x, screen_origin.y - size.y * 0.7f, 60, 20, Color (0, 0, 0, 187)); // sex
//render::get().rect_filled(screen_origin.x - size.x * 0.5f, screen_origin.y - size.y * 0.5f - 1.0f, size.x, size.y, Color (37, 37, 37, g_cfg.esp.smoke_timer_color.a ()));
//render::get().rect_filled(screen_origin.x - size.x * 0.5f + 2.0f, screen_origin.y - size.y * 0.5f, (size.x - 4.0f) * factor, size.y - 2.0f, g_cfg.esp.smoke_timer_color);
//render::get().rect(screen_origin.x - size.x * 0.5f, screen_origin.y - size.y * 0.5f, size.x, size.y, Color (7, 7, 7, g_cfg .esp.smoke_timer_color.a ()));
render :: get (). text (fonts [ESP], screen_origin.x, screen_origin.y - size.y * 0.5f, g_cfg.esp.smoke_timer_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "SMOKE");
//render::get().text(fonts [GRENADES], screen_origin.x + 1.0f, screen_origin.y - size.y * 0.5f - 9.0f, g_cfg.esp.smoke_timer_color, HFONT_CENTERED_X | HFONT_CENTERED_Y, "k" );
}
C++:
void render :: CircularProgressBar (int x, int y, int r1, int r2, int s, int d, Color col, bool inverse)
{
for (int i = s; i <s + d; i ++)
{
auto rad = i * 3.1415 / 180;
if (! inverse)
line (x + cos (rad) * r1, y + sin (rad) * r1, x + cos (rad) * r2, y + sin (rad) * r2, col);
else
line (x - sin (rad) * r1, y - cos (rad) * r1, x - sin (rad) * r2, y - cos (rad) * r2, col);
}
}
C++:
void CircularProgressBar (int x, int y, int r1, int r2, int s, int d, Color col, bool inverse);
Пожалуйста, авторизуйтесь для просмотра ссылки.