Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static auto oSceneEnd = g_Hooks.pRenderViewHook->GetOriginal<SceneEnd_t>(9);
- oSceneEnd(ecx);
- g::pLocalEntity = g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer());
- if (!g::pLocalEntity)
- return;
- float flColor[3] = { 0.f };
- float flColor2[3] = { 0.f };
- float flColor3[3] = { 0.f };
- flColor[0] = 60.f / 255.f;
- flColor[1] = 120.f / 255.f;
- flColor[2] = 180.f / 255.f;
- flColor2[0] = 150.f / 255.f;
- flColor2[1] = 200.f / 255.f;
- flColor2[2] = 60.f / 255.f;
- flColor3[0] = 255.f / 255.f;
- flColor3[1] = 255.f / 255.f;
- flColor3[2] = 255.f / 255.f;
- Color LocalColor = Color(g_Settings.localchamscol, g_Settings.localchamscol[3] * 255);
- Color EnemyColor = Color(g_Settings.chamshidden, g_Settings.chamshidden[3] * 255);
- Color LocalColorXqz = Color(g_Settings.localchamscol, g_Settings.localchamscol[3] * 255);
- Color EnemyColorXqz = Color(g_Settings.chamsvisible, g_Settings.chamsvisible[3] * 255);
- if (!g::pLocalEntity || !g_pEngine->IsInGame())
- return;
- if (!g_pEngine->IsInGame() && !g_pEngine->IsConnected())
- return;
- for (int it = 1; it <= g_pEngine->GetMaxClients(); ++it)
- {
- C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(it);
- if (!pPlayerEntity
- || !pPlayerEntity->IsAlive()
- || pPlayerEntity->IsDormant())
- continue;
- bool IsLocal = pPlayerEntity == g::pLocalEntity;
- bool IsTeam = pPlayerEntity->GetTeam() == g::pLocalEntity->GetTeam();
- bool normal = false;
- bool flat = false;
- bool wireframe = false;
- bool glass = false;
- bool metallic = false;
- bool xqz = false;
- bool metallic_xqz = false;
- bool flat_xqz = false;
- bool wireframe_xqz = false;
- bool onetapsu = false;
- int mode = IsLocal ? g_Settings.iLocalChamsMode : g_Settings.iChamsMode;
- if (IsLocal && !g_Settings.bShowLocalChams)
- {
- continue;
- }
- if ((IsTeam && !IsLocal) && !g_Settings.bShowTeammates)
- {
- continue;
- }
- /*
- if (!IsTeam && !g_Settings.bShowChams)
- {
- continue;
- }
- */
- Color clr = IsLocal ? LocalColor : EnemyColor;
- Color clr2 = IsLocal ? LocalColorXqz : EnemyColorXqz;
- switch (mode)
- {
- case 1:
- xqz = true;
- break;
- case 2:
- flat_xqz = true;
- break;
- case 3:
- metallic_xqz = true; // metallic xqz
- break;
- case 4:
- xqz = true;
- }
- switch (mode)
- {
- case 1:
- normal = true;
- break;
- case 2:
- flat = true;
- break;
- case 3:
- metallic = true;
- break;
- case 4:
- normal = true;
- break;
- }
- // tv chams
- // switch places ! --
- if (g_Settings.bShowChams)
- {
- MaterialManager::get().OverrideMaterial(xqz || flat_xqz || wireframe_xqz || metallic_xqz, flat, wireframe, glass, metallic, metallic_xqz, onetapsu); // add it to ||
- g_pRenderView->SetColorModulation(clr2.red / 255.f, clr2.green / 255.f, clr2.blue / 255.f);
- g_pRenderView->SetBlend(clr2.alpha / 255.f);
- pPlayerEntity->GetClientRenderable()->DrawModel(0x1, 255);
- }
- if (g_Settings.bShowChamsXQZ) // else if
- {
- if (xqz || flat_xqz || wireframe_xqz || metallic_xqz)
- {
- MaterialManager::get().OverrideMaterial(false, flat, wireframe, glass, metallic, metallic_xqz, onetapsu);
- g_pRenderView->SetColorModulation(clr.red / 255.f, clr.green / 255.f, clr.blue / 255.f);
- g_pRenderView->SetBlend(clr.alpha / 255.f);
- pPlayerEntity->GetClientRenderable()->DrawModel(0x1, 255);
- }
- }
- g_pModelRender->ForcedMaterialOverride(nullptr);
- }
- g_pModelRender->ForcedMaterialOverride(nullptr);
- }
- int __fastcall Hooks::DoPostScreenEffects(void* ecx, void* edx, int a1)
- {
- static auto oDoPostScreenEffects = g_Hooks.pClientModeHook->GetOriginal<DoPostScreenEffects_t>(44);
- if (g_Settings.bShowGlow || g_Settings.iChamsMode == 4)
- DoGlow->DrawGlow();
- return oDoPostScreenEffects(ecx, edx, a1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement