mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix CClientState shifted pointer
Shifted pointer address was wrong, this approach is more robust.
This commit is contained in:
parent
b33c8794a0
commit
2ecc556d08
@ -219,7 +219,7 @@ class VClientState : public IDetour
|
||||
virtual void GetVar(void) const
|
||||
{
|
||||
g_pClientState = g_GameDll.FindPatternSIMD("0F 84 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 83 C4 28").FindPatternSelf("48 8D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<CClientState*>(); /*0F 84 ? ? ? ? 48 8D 0D ? ? ? ? 48 83 C4 28*/
|
||||
g_pClientState_Shifted = g_GameDll.FindPatternSIMD("80 3D ?? ?? ?? ?? ?? 74 14 66 0F 6E 05 ?? ?? ?? ??").ResolveRelativeAddress(0x2, 0x7).RCast<CClientState**>();
|
||||
g_pClientState_Shifted = reinterpret_cast<CClientState**>(reinterpret_cast<int64_t*>(g_pClientState)+1); // Shift by 8 bytes.
|
||||
}
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void Attach(void) const { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user