#include <Windows.h>
struct offsets {
uintptr_t dwGlowObjectManager;
uintptr_t m_iGlowIndex;
uintptr_t dwEntityList;
uintptr_t dwLocalPlayer;
uintptr_t m_bDormant;
uintptr_t m_iTeamNum;
} offsets;
DWORD fMain(HMODULE hMod)
{
uintptr_t client = (uintptr_t)GetModuleHandle(TEXT("client_panorama.dll"));
offsets.dwGlowObjectManager = 0x527CEB8;
offsets.m_iGlowIndex = 0xA428;
offsets.dwEntityList = 0x4D3B69C;
offsets.dwLocalPlayer = 0xD27AAC;
offsets.m_bDormant = 0xED;
offsets.m_iTeamNum = 0xF4;
uintptr_t pLocalPlayer = client + offsets.dwLocalPlayer;
uintptr_t pGlowObjectManager = client + offsets.dwGlowObjectManager;
uintptr_t pEntityList = client + offsets.dwEntityList;
while (true)
{
if (GetAsyncKeyState(VK_END)) break;
uintptr_t LocalPlayer = *(uintptr_t*)pLocalPlayer;
uintptr_t GlowObjectManager = *(uintptr_t*)pGlowObjectManager;
uintptr_t EntityList = *(uintptr_t*)pEntityList;
if (LocalPlayer != NULL && GlowObjectManager != NULL && EntityList != NULL)
{
int myTeamNum = *(int*)(LocalPlayer + offsets.m_iTeamNum);
for (short i = 0; i < 64; i++)
{
uintptr_t entity = *(uintptr_t*)(pEntityList + i * 0x10);
if (entity == NULL) continue;
if (*(bool*)(entity + offsets.m_bDormant)) continue;
int glowIndex = *(int*)(entity + offsets.m_iGlowIndex);
int entTeamNum = *(int*)(entity + offsets.m_iTeamNum);
if (entTeamNum == myTeamNum)
{
// Teammate
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0x4)) = 0.f;
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0x8)) = 0.f;
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0xC)) = 1.f;
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0x10)) = 1.7f;
}
else
{
// Enemy
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0x4)) = 1.f;
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0x8)) = 0.f;
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0xC)) = 0.f;
*(float*)((GlowObjectManager)+((glowIndex * 0x38) + 0x10)) = 1.7f;
}
*(bool*)((GlowObjectManager)+((glowIndex * 0x38) + 0x24)) = true;
*(bool*)((GlowObjectManager)+((glowIndex * 0x38) + 0x25)) = false;
}
}
Sleep(1);
}
FreeLibrary(hMod);
// FreeLibraryAndExitThread(hMod, 0);
return 0;
}
BOOL APIENTRY DllMain(HMODULE hMod, DWORD fdwReason, LPVOID lpReserved)
{
DisableThreadLibraryCalls(hMod);
if (fdwReason == DLL_PROCESS_ATTACH)
CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)fMain, hMod, 0, nullptr);
return TRUE;
}