I have an offset to a property within a player class that I need to access data from. It's made of a specific struct that I have already assembled. IDA reports the accessing offset as so:
v32 = ( v3 + 280 ) // v3 is the player in this case
I want to convert this to the correct struct within my own C++ module so I can read a specific property of that struct. I can easily get the base address of the players but whenever I get the property it doesn't come out correct.
I have tried something of the following:
playerData* lpData = reinterpret_cast<playerData*>((int)n_GetLocalPlayer() + 280);
But the struct isn't correct.
There is NO doubt that the base address or offset are correct, as the function I reversed in IDA was short and well commented. I just need help casting it.