-
Автор темы
- #1
I'm having a problem at the time of rendering chams on players who have patches in their agents.
I've looked in uc and some other sites and this is the only fix i found
Well, i wouldn't call it a fix 'cus still not working.
If someone could tell me the reason of why it's not working or any solution it'd be appreaciated :D
I've looked in uc and some other sites and this is the only fix i found
C++:
// The function where the magic should occur
// I'm calling this on fsn (I've tried with FRAME_RENDER_START and FRAME_NET_UPDATE_END)
void misc::remove_agent_patches()
{
if (g_cfg.player.enable)
return;
if (!g_cfg.player.type[ENEMY].chams_enable && !g_cfg.player.type[TEAM].chams_enable && !g_cfg.player.type[LOCAL].chams_enable)
return;
for (size_t i = 1; i <= m_engine()->GetMaxClients(); i++)
{
player_t* player = (player_t*)m_entitylist()->GetClientEntity(i);
if (!player->is_alive())
continue;
for (size_t k = 0; k < 5; k++)
{
player->m_vecPlayerPatchEconIndices()[k] = NULL;
}
}
}
C++:
// The definition of m_vecPlayerPatchEconIndices
NETVAR(Vector, m_vecPlayerPatchEconIndices, crypt_str("DT_CSPlayer"), crypt_str("m_vecPlayerPatchEconIndices"));
If someone could tell me the reason of why it's not working or any solution it'd be appreaciated :D