I'm reading a struct of a game. Then I modifiy this struct and write it back (Using RPM and WPM). If I write back the whole struct, I get crashes in the game I'm trying to hack. That's why I want to write only a part of a struct. How can this be achieved? (Ex. float r till float b)
struct GlowStruct
{
void* m_pEntity;
float r;
float g;
float b;
float m_flGlowAlpha;
unsigned char _0x0014[16];
bool m_bShouldGlow;
bool m_bUnknown;
bool m_bFullBloomRender;
unsigned char _0x0027[13];
}GlowStructA;
// Where I'm writing to. I read my struct from the same place.
WriteProcessMemory(hProcess, (LPVOID)(GlowPointer + (Glowindex * 0x38)), &GlowStructA, sizeof(GlowStruct), NULL);