Advertisement
tonti666

Untitled

Oct 23rd, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. void DiLight()
  2. {
  3. IClientEntity *pLocal = hackManager.pLocal();
  4.  
  5. RECT scrn = Render::GetViewport();
  6.  
  7. // Loop through all active entitys
  8. for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
  9. {
  10. // Get the entity
  11. IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
  12. player_info_t pinfo;
  13.  
  14. // The entity isn't some laggy peice of shit or something
  15. if (pEntity && pEntity != pLocal)
  16. {
  17. if (!Menu::Window.VisualsTab.FiltersPlayers.GetState() && !(pEntity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
  18. break;
  19. if (Menu::Window.VisualsTab.FiltersEnemiesOnly.GetState() && (pEntity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
  20. break;
  21. if (Interfaces::Engine->GetPlayerInfo(i, &pinfo) && pEntity->IsAlive() && !pEntity->IsDormant())
  22. {
  23. dlight_t* pElight = Interfaces::Dilight->CL_AllocElight(i);
  24. pElight->origin = pEntity->GetOrigin() + Vector(0.0f, 0.0f, 35.0f);
  25. pElight->radius = 2000.0f;
  26. pElight->color.b = Menu::Window.ColorTab.GlowB.GetValue();
  27. pElight->color.g = Menu::Window.ColorTab.GlowG.GetValue();
  28. pElight->color.r = Menu::Window.ColorTab.GlowR.GetValue();
  29. pElight->die = Interfaces::Globals->curtime + 0.05f;
  30. pElight->decay = pElight->radius / 5.0f;
  31. pElight->key = i;
  32.  
  33. dlight_t* pDlight = Interfaces::Dilight->CL_AllocDlight(i);
  34. pDlight->origin = pEntity->GetOrigin();
  35. pDlight->radius = 2000.0f;
  36. pDlight->color.b = Menu::Window.ColorTab.GlowB.GetValue();
  37. pDlight->color.g = Menu::Window.ColorTab.GlowG.GetValue();
  38. pDlight->color.r = Menu::Window.ColorTab.GlowR.GetValue();
  39. pDlight->die = Interfaces::Globals->curtime + 0.05f;
  40. pDlight->decay = pDlight->radius; // / 5.0f;
  41. pDlight->key = i;
  42. }
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement