- Status
- Offline
- Joined
- Apr 18, 2019
- Messages
- 147
- Reaction score
- 249
Since it looks pretty cool, I decided to share chams with you
After appling regular chams and BEFORE setting ForcedMaterialOverride to nullptr:
C++:
static IMaterial* pMatGloss = g_pMaterialSystem->FindMaterial("models/inventory_items/trophy_majors/gloss", TEXTURE_GROUP_OTHER); //you can create your own material to really make it shiny, but i like this subtle one
After appling regular chams and BEFORE setting ForcedMaterialOverride to nullptr:
C++:
if (g_Settings.bChamsGloss) {
Color col = g_Settings.cChamsGloss;
bool bFound = false;
auto pVar = pMatGloss->FindVar("$envmaptint", &bFound);
if (bFound)
(*(void(__thiscall **)(int, float, float, float))(*(DWORD *)pVar + 44))((uintptr_t)pVar, col.red / 255.f, col.green / 255.f, col.blue / 255.f); //tfw no IMaterialVar class
g_pModelRender->ForcedMaterialOverride(pMatGloss);
oDrawModelExecute(g_pModelRender, ctx, state, info, matrix);
}