-
Автор темы
- #1
C++:
//g_Tools->FindPattern( g_Globals.m_ModuleList.m_ClientDll, _S( "55 8B EC 83 E4 C0 83 EC 78 56 57 8B F1 FF 15 3C" ) );
C_KeyValues* __fastcall C_Hooks::CCSWeaponVisualsDataProcessorGenerateCompositeMaterialKeyValues(LPVOID pEcx, uint32_t, int nMaterialParamId)
{
auto original = g_Globals.m_Hooks.m_Originals.m_SetVisualsData(pEcx, nMaterialParamId);
char charTemp[64];
const float fColor255toFloat = 1.0f / 255.0f;
snprintf(charTemp, sizeof(charTemp), "[%f %f %f]", g_Settings->m_aSkinColor0.r() / 255.f, g_Settings->m_aSkinColor0.g() / 255.f, g_Settings->m_aSkinColor0.b() / 255.f);
original->SetString("$camocolor0", charTemp);
snprintf(charTemp, sizeof(charTemp), "[%f %f %f]", g_Settings->m_aSkinColor1.r() / 255.f, g_Settings->m_aSkinColor1.g() / 255.f, g_Settings->m_aSkinColor1.b() / 255.f);
original->SetString("$camocolor1", charTemp);
snprintf(charTemp, sizeof(charTemp), "[%f %f %f]", g_Settings->m_aSkinColor2.r() / 255.f, g_Settings->m_aSkinColor2.g() / 255.f, g_Settings->m_aSkinColor2.b() / 255.f);
original->SetString("$camocolor2", charTemp);
snprintf(charTemp, sizeof(charTemp), "[%f %f %f]", g_Settings->m_aSkinColor3.r() / 255.f, g_Settings->m_aSkinColor3.g() / 255.f, g_Settings->m_aSkinColor3.b() / 255.f);
original->SetString("$camocolor3", charTemp);
return original;
}