void otheresp::penetration_reticle()
{
if (!g_cfg.player.enable)
return;
if (!g_cfg.esp.penetration_reticle)
return;
if (!g_ctx.local()->is_alive())
return;
auto weapon = g_ctx.local()->m_hActiveWeapon().Get();
if (!weapon)
return;
auto color = Color::Red;
if (weapon->is_non_aim() || weapon->m_iItemDefinitionIndex() == WEAPON_TASER)
return;
if (can_penetrate(weapon))
color = Color::Green;
static int width, height;
m_engine()->GetScreenSize(width, height);
auto x = width / 2, y = height / 2;
int a = (int)(y / 2 / 50);
float gamma = atan(a / a);
static auto rotationdegree = 0.f;
for (int i = 0; i <= 4; i++) {
std::vector <int> p;
p.push_back(a * sin(DEG2RAD(rotationdegree + (i * 90))));
p.push_back(a * cos(DEG2RAD(rotationdegree + (i * 90))));
p.push_back((a / cos(gamma)) * sin(DEG2RAD(rotationdegree + (i * 90) + RAD2DEG(gamma))));
p.push_back((a / cos(gamma)) * cos(DEG2RAD(rotationdegree + (i * 90) + RAD2DEG(gamma))));
render::get().line(x, y, x + p[0], y - p[1], color);
render::get().line(x + p[0], y - p[1], x + p[2], y - p[3], color);
}
rotationdegree++;
}