This class is causing me to crash
Can someone give me the updated one or am I doing something wrong?
What I have:
Code:
class cPlayerManager
{
public:
char pad[24];
cClientWeaponMgr* WeaponMgr; //0018
char unknown0[48];
float Pitch; //0048
float Yaw; //004C
float Roll;
char unknown3[220];
int* CameraObject; //012C
__inline CClientWeapon* GetCurrentWeapon()
{
if( WeaponMgr && WeaponMgr->CurrentWeapon )
return WeaponMgr->CurrentWeapon;
return NULL;
}
};
How I am using it:
Code:
cPlayerManager* pPlayerManager;
pPlayerManager= *(cPlayerMgr**)ADDR_PLAYERMANAGER; //0x37809C0B <-- What its defined as
// A few lines of code here, but they are working fine
LocalPlayer.CameraObject = pPlayerManager->CameraObject; // <-- Crashes on this line
Where am I going wrong?
Creds to @Xipher for the addy ^^