Перейти к содержанию
Опубликовано
comment_228

Как должно получится:

 

gKiQmUw.jpg

 

Сурс:

 

 

  1. for (int i = 1; i <= Interfaces::Globals->maxClients; ++i) {
  2. IClientEntity* ent = Interfaces::EntList->GetClientEntity(i);
  3. // IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity;
  4. IClientEntity* pLocal = (IClientEntity*)Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  5. // IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity;//(pInfo.entity_index);
  6. if (!ent) continue;
  7. //if (pModelEntity == nullptr)
  8. //return;
  9. static IMaterial* CoveredLit = CreateMaterial(true);
  10. static IMaterial* CoveredFlat = CreateMaterial(true, true);
  11. int ChamsStyle = Menu::Window.VisualsTab.OtherChams.GetState();
  12. //if (ent == Interfaces::Engine->GetLocalPlayer) continue;
  13. //static IMaterial* mat = CreateMaterial(true, true, false);
  14. if (pLocal && ChamsStyle != 0)
  15. {
  16. if (pLocal == nullptr)
  17. return;
  18. IMaterial *mat = ChamsStyle == 1 ? CoveredLit : CoveredFlat;
  19. //IMaterial *mat = CreateMaterial(true, true, false);
  20. 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);
    }
  21. }
  22. Interfaces::ModelRender->ForcedMaterialOverride(nullptr);

 

 

Рекомендуемые сообщения

Опубликовано
comment_232

Как должно получится:

 

gKiQmUw.jpg

 

Сурс:

 

 

  1. for (int i = 1; i <= Interfaces::Globals->maxClients; ++i) {
  2. IClientEntity* ent = Interfaces::EntList->GetClientEntity(i);
  3. // IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity;
  4. IClientEntity* pLocal = (IClientEntity*)Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  5. // IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity;//(pInfo.entity_index);
  6. if (!ent) continue;
  7. //if (pModelEntity == nullptr)
  8. //return;
  9. static IMaterial* CoveredLit = CreateMaterial(true);
  10. static IMaterial* CoveredFlat = CreateMaterial(true, true);
  11. int ChamsStyle = Menu::Window.VisualsTab.OtherChams.GetState();
  12. //if (ent == Interfaces::Engine->GetLocalPlayer) continue;
  13. //static IMaterial* mat = CreateMaterial(true, true, false);
  14. if (pLocal && ChamsStyle != 0)
  15. {
  16. if (pLocal == nullptr)
  17. return;
  18. IMaterial *mat = ChamsStyle == 1 ? CoveredLit : CoveredFlat;
  19. //IMaterial *mat = CreateMaterial(true, true, false);
  20. 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);

    }

  21. }
  22. Interfaces::ModelRender->ForcedMaterialOverride(nullptr);

 

 

И смысл от этого кода? Это лишь пример реализации... Ты если пастишь, то думай хоть немного. SceneEnd это хук, в котором можно сделать чамсы. Отличие этих чамсов от обычных в том, что на них есть тени и для их отрисовки необходимо рисовать еще одну модель. Держу в курсе

Гость
Эта тема закрыта для публикации ответов.