Как должно получится:
Скрытый текст

Сурс:
Скрытый текст
- for (int i = 1; i <= Interfaces::Globals->maxClients; ++i) {
- IClientEntity* ent = Interfaces::EntList->GetClientEntity(i);
- // IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity;
- IClientEntity* pLocal = (IClientEntity*)Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
- // IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity;//(pInfo.entity_index);
- if (!ent) continue;
- //if (pModelEntity == nullptr)
- //return;
- static IMaterial* CoveredLit = CreateMaterial(true);
- static IMaterial* CoveredFlat = CreateMaterial(true, true);
- int ChamsStyle = Menu::Window.VisualsTab.OtherChams.GetState();
- //if (ent == Interfaces::Engine->GetLocalPlayer) continue;
- //static IMaterial* mat = CreateMaterial(true, true, false);
- if (pLocal && ChamsStyle != 0)
- {
- if (pLocal == nullptr)
- return;
- IMaterial *mat = ChamsStyle == 1 ? CoveredLit : CoveredFlat;
- //IMaterial *mat = CreateMaterial(true, true, false);
- if (mat)
{
flColor[0] = Menu::Window.ColorTab.TChamsR.GetValue() / 255.f;
flColor[1] = Menu::Window.ColorTab.TChamsG.GetValue() / 255.f;
flColor[2] = Menu::Window.ColorTab.TChamsB.GetValue() / 255.f;
Interfaces::RenderView->SetColorModulation(flColor);
Interfaces::ModelRender->ForcedMaterialOverride(mat);
ent->draw_model(STUDIO_RENDER, 255);
} - }
- Interfaces::ModelRender->ForcedMaterialOverride(nullptr);