Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. //--- Entity Glow ---//
  2. for (auto i = 0; i < INTERFACES::GlowObjManager->GetSize(); i++)
  3. {
  4. auto &glowObject = INTERFACES::GlowObjManager->m_GlowObjectDefinitions[i];
  5. auto entity = reinterpret_cast<SDK::CBaseEntity*>(glowObject.m_pEntity);
  6. auto m_pLocalPlayer = reinterpret_cast<SDK::CBaseEntity*>(INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer()));
  7.  
  8. if (!entity)
  9. continue;
  10.  
  11. if (!m_pLocalPlayer)
  12. continue;
  13.  
  14. if (glowObject.IsUnused())
  15. continue;
  16.  
  17. bool is_local_player = entity == m_pLocalPlayer;
  18. bool is_teammate = m_pLocalPlayer->GetTeam() == entity->GetTeam() && !is_local_player;
  19.  
  20. if (is_local_player)
  21. continue;
  22.  
  23. if (is_local_player && in_tp && SETTINGS::settings.localglow_bool) //unused
  24. {
  25. glowObject.m_nGlowStyle = 1;
  26. glowObject.m_flAlpha = 1.f;
  27. glowObject.m_flRed = color.RGBA[0] / 255.0f;
  28. glowObject.m_flGreen = color.RGBA[1] / 255.0f;
  29. glowObject.m_flBlue = color.RGBA[2] / 255.0f;
  30. glowObject.m_bRenderWhenOccluded = true;
  31. glowObject.m_bRenderWhenUnoccluded = false;
  32. glowObject.m_bFullBloomRender = true;
  33. continue;
  34. }
  35.  
  36. if (!SETTINGS::settings.glow_bool)
  37. continue;
  38.  
  39. if (is_teammate)
  40. continue;
  41.  
  42. auto class_id = entity->GetClientClass()->m_ClassID;
  43.  
  44.  
  45. switch (class_id)
  46. {
  47. default:
  48. glowObject.m_flAlpha = 0.0f;
  49. break;
  50. case 35:
  51. glowObject.m_nGlowStyle = 0;
  52. glowObject.m_flAlpha = 0.7f;
  53. break;
  54. }
  55.  
  56. glowObject.m_flRed = color.RGBA[0] / 255.0f;
  57. glowObject.m_flGreen = color.RGBA[1] / 255.0f;
  58. glowObject.m_flBlue = color.RGBA[2] / 255.0f;
  59. glowObject.m_bRenderWhenOccluded = true;
  60. glowObject.m_bRenderWhenUnoccluded = false;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement