void __fastcall hkPaintTraverse(void* _this, int edx, vgui::VPANEL panel, bool forceRepaint, bool allowForce)
{
static auto panelId = vgui::VPANEL{ 0 };
static auto oPaintTraverse = vguipanel_hook.get_original<decltype(&hkPaintTraverse)>(index::PaintTraverse);
if (Variables.VisualsNoScope && strcmp("HudZoom", g_VGuiPanel->GetName(panel)) == 0)
return;
oPaintTraverse(g_VGuiPanel, edx, panel, forceRepaint, allowForce);
if (!panelId) {
const auto panelName = g_VGuiPanel->GetName(panel);
if (!strcmp(panelName, "FocusOverlayPanel")) {
panelId = panel;
}
}
else if (panelId == panel) {
int ScreenWidth, ScreenHeight;
g_EngineClient->GetScreenSize(ScreenWidth, ScreenHeight);
//Render::Get().Text(1, 1, "Sahara csgo", Render::Get().VerdanaBold12, Color(255, 255, 255, 255), false);
if (!g_EngineClient->IsInGame() || !g_EngineClient->IsConnected() || !g_LocalPlayer)
return;
C_BaseCombatWeapon* Weapon = g_LocalPlayer->m_hActiveWeapon();
if (InputSys::Get().IsKeyDown(VK_TAB))
Utils::RankRevealAll();
if (Weapon && Variables.VisualsNoScope && Weapon->IsSniper() && g_LocalPlayer->m_bIsScoped())
{
Render::Get().Line(ScreenWidth / 2, 0, ScreenWidth / 2, ScreenHeight, Color(0, 0, 0, 150));
Render::Get().Line(0, ScreenHeight / 2, ScreenWidth, ScreenHeight / 2, Color(0, 0, 0, 150));
}
for (int i = 1; i <= 64; i++)
{
auto Player = C_BasePlayer::GetPlayerByIndex(i);
if (!Player)
continue;
//if (entity == g_LocalPlayer)
// continue;
if (i < 65 && Player->IsAlive())
{
if (Visuals::Get().Begin(Player))
{
if (Variables.VisualsBox)
Visuals::Get().Box();
if (Variables.VisualsHealth)
Visuals::Get().Health();
if (Variables.VisualsName)
Visuals::Get().Name();
if (Variables.VisualsWeapon)
Visuals::Get().Weapon();
}
}
}
}
}