void c_visuals::BoxESP(C_BaseEntity* Entity) {
Vector min, max;
Entity->GetRenderBounds(min, max);
Vector pos, pos3D, top, top3D;
pos3D = Entity->GetAbsOrigin() - Vector(0, 0, 10);
top3D = pos3D + Vector(0, 0, max.z + 11);
Color ESP = Entity->IsDormant() ? Color(150, 150, 150, flPlayerAlpha[Entity->EntIndex()]) : Color(c_config::get().box_esp_color_r, c_config::get().box_esp_color_g, c_config::get().box_esp_color_b, flPlayerAlpha[Entity->EntIndex()]);
Color ESP2 = Entity->IsDormant() ? Color(0, 0, 0, flPlayerAlpha[Entity->EntIndex()]) : Color(0, 0, 0, flPlayerAlpha[Entity->EntIndex()]);
if (WorldToScreen(pos3D, pos) && WorldToScreen(top3D, top))
{
int height = (pos.y - top.y);
int y = top.y;
int width = height / 2;
int x = pos.x - ((width / 2) / 2);
int x2 = pos.x - (width / 2);
int h = height;
int w = width / 2;
int iw = w / 3.5;
int ih = (h / 3.5) - 1;
bool IsTeammate = Entity->GetTeam() == Globals::LocalPlayer->GetTeam();
bool IsEnemy = Entity->GetTeam() != Globals::LocalPlayer->GetTeam();
bool IsLocal = Entity == Globals::LocalPlayer;
if (IsEnemy) {
g_pSurface->OutlinedRect(x2, y, width, height, ESP);
g_pSurface->OutlinedRect(x2 - 1, y - 1, width + 2, height + 2, ESP2);
g_pSurface->OutlinedRect(x2 + 1, y + 1, width - 2, height - 2, ESP2);
}
}
}