struct GlowObjectDefinition_t
{
void* pEntity;
float r;
float g;
float b;
float a;
uint8_t unk1[16];
bool m_bRenderWhenOccluded;
bool m_bRenderWhenUnoccluded;
bool m_bFullBloom;
uint8_t unk2[10];
};
static const pm::address_t<void*> ppGlowObjectArray = GetCSGOModule("client.dll") + 0x4B1CFB4;
static GlowObjectDefinition_t glowObjects[128];
while (true)
{
uintptr_t pGlowObjectArray;
ReadProcessMemory(hProcess, ppGlowObjectArray.get(), &pGlowObjectArray, sizeof(uintptr_t), nullptr);
uint32_t objectCount;
if (ReadProcessMemory(hProcess, (ppGlowObjectArray + 4).get(), &objectCount, sizeof(uint32_t), nullptr) && objectCount)
{
if (ReadProcessMemory(hProcess, (void*)pGlowObjectArray, glowObjects, objectCount * sizeof(GlowObjectDefinition_t), nullptr))
{
for (int i = 0; i < objectCount; i++)
{
//you can do your visibility and teamchecks and what not here
//use glowObjects[i].pEntity for that
glowObjects[i].a = 1.f;
glowObjects[i].r = 0.5f;
glowObjects[i].g = 0.f;
glowObjects[i].b = 0.f;
glowObjects[i].m_bRenderWhenOccluded = true;
glowObjects[i].m_bRenderWhenUnoccluded = false;
}
WriteProcessMemory(hProcess, (void*)pGlowObjectArray, glowObjects, objectCount * sizeof(GlowObjectDefinition_t), nullptr);
}
}
}