-
Автор темы
- #1
вкл визуалы == краш
(ебаный xy0)
дебаг сказал туда нам надо ///////////
code:
void c_visuals::DrawPlayers() {
force_crosshair();
int spectator_count = 0;
for (int Index = 1; Index < g_pGlobalVars->maxClients; Index++)
{
auto Entity = g_pEntityList->GetClientEntity(Index);/////////
auto LocalPlayer = Globals::LocalPlayer;
if (Entity && !Entity->IsDormant())
worldWeapon(Entity);
if (!Entity || !LocalPlayer || !Entity->IsAlive())
continue;
ClientClass* cClass = (ClientClass*)Entity->GetClientClass();
if (cClass->ClassID != (int)EClassIds::CBaseWeaponWorldModel && ((strstr(cClass->pNetworkName, "Weapon") || cClass->ClassID == (int)EClassIds::CDEagle || cClass->ClassID == (int)EClassIds::CAK47))) {
DrawWeapon(Entity);
}
bool IsTeammate = Entity->GetTeam() == LocalPlayer->GetTeam();
bool IsEnemy = Entity->GetTeam() != LocalPlayer->GetTeam();
bool IsLocal = Entity == LocalPlayer;
if (!Entity->IsDormant()) {
StoredCurtimePlayer[Entity->EntIndex()] = g_pGlobalVars->curtime;
}
if (Entity->IsDormant() && flPlayerAlpha[Entity->EntIndex()] > 0 && g_pGlobalVars->curtime - StoredCurtimePlayer[Entity->EntIndex()] > 2)
{
flPlayerAlpha[Entity->EntIndex()] -= 5;
}
else if (flPlayerAlpha[Entity->EntIndex()] < 255 && !(Entity->IsDormant()))
{
flPlayerAlpha[Entity->EntIndex()] += 5;
}
//spectators();
if (IsEnemy) {
if (c_config::get().name_enemies) NameESP(Entity);
if (c_config::get().box_enemies) BoxESP(Entity);
if (c_config::get().weapon_enemies) WeaponESP(Entity);
if (c_config::get().ammo_enemy) Ammo(Entity);
if (c_config::get().health_enemies > 0) HealthESP(Entity);
if (c_config::get().fov_arrows_enemy) arrows(Entity);
flags(Entity);
}
}
}