Опубликовано 4 января, 20188 г. comment_228 Как должно получится: Сурс: 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);
Опубликовано 4 января, 20188 г. comment_229 @@math. , указывай, для какой это игры. With love by P45H3 =)
Опубликовано 5 января, 20188 г. comment_232 Как должно получится: Сурс: 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); И смысл от этого кода? Это лишь пример реализации... Ты если пастишь, то думай хоть немного. SceneEnd это хук, в котором можно сделать чамсы. Отличие этих чамсов от обычных в том, что на них есть тени и для их отрисовки необходимо рисовать еще одну модель. Держу в курсе
comment_228Как должно получится:
Сурс:
{
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);
}