Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DiLight()
- {
- IClientEntity *pLocal = hackManager.pLocal();
- RECT scrn = Render::GetViewport();
- // Loop through all active entitys
- for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
- {
- // Get the entity
- IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
- player_info_t pinfo;
- // The entity isn't some laggy peice of shit or something
- if (pEntity && pEntity != pLocal)
- {
- if (!Menu::Window.VisualsTab.FiltersPlayers.GetState() && !(pEntity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
- break;
- if (Menu::Window.VisualsTab.FiltersEnemiesOnly.GetState() && (pEntity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
- break;
- if (Interfaces::Engine->GetPlayerInfo(i, &pinfo) && pEntity->IsAlive() && !pEntity->IsDormant())
- {
- dlight_t* pElight = Interfaces::Dilight->CL_AllocElight(i);
- pElight->origin = pEntity->GetOrigin() + Vector(0.0f, 0.0f, 35.0f);
- pElight->radius = 2000.0f;
- pElight->color.b = Menu::Window.ColorTab.GlowB.GetValue();
- pElight->color.g = Menu::Window.ColorTab.GlowG.GetValue();
- pElight->color.r = Menu::Window.ColorTab.GlowR.GetValue();
- pElight->die = Interfaces::Globals->curtime + 0.05f;
- pElight->decay = pElight->radius / 5.0f;
- pElight->key = i;
- dlight_t* pDlight = Interfaces::Dilight->CL_AllocDlight(i);
- pDlight->origin = pEntity->GetOrigin();
- pDlight->radius = 2000.0f;
- pDlight->color.b = Menu::Window.ColorTab.GlowB.GetValue();
- pDlight->color.g = Menu::Window.ColorTab.GlowG.GetValue();
- pDlight->color.r = Menu::Window.ColorTab.GlowR.GetValue();
- pDlight->die = Interfaces::Globals->curtime + 0.05f;
- pDlight->decay = pDlight->radius; // / 5.0f;
- pDlight->key = i;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement