mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Remove 'g_pClient' pointer
The whole array is part of the CServer class.
This commit is contained in:
parent
c6a9b855a2
commit
2f209ddb60
@ -236,6 +236,3 @@ bool CClient::VSendNetMsgEx(CClient* pClient, CNetMessage* pMsg, char bLocal, bo
|
||||
{
|
||||
return pClient->SendNetMsgEx(pMsg, bLocal, bForceReliable, bVoice);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
CClient* g_pClient = nullptr;
|
@ -57,7 +57,6 @@ class CClientFrame
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
extern CClient* g_pClient;
|
||||
|
||||
class CClient : IClientMessageHandler, INetChannelHandler
|
||||
{
|
||||
@ -235,7 +234,6 @@ class VClient : public IDetour
|
||||
LogFunAdr("CClient::SetSignonState", p_CClient_SetSignonState.GetPtr());
|
||||
LogFunAdr("CClient::SendNetMsgEx", p_CClient_SendNetMsgEx.GetPtr());
|
||||
LogFunAdr("CClient::SendSnapshot", p_CClient_SendSnapshot.GetPtr());
|
||||
LogVarAdr("g_Client[128]", reinterpret_cast<uintptr_t>(g_pClient));
|
||||
}
|
||||
virtual void GetFun(void) const
|
||||
{
|
||||
@ -268,11 +266,7 @@ class VClient : public IDetour
|
||||
v_CClient_SendNetMsgEx = p_CClient_SendNetMsgEx.RCast<bool (*)(CClient*, CNetMessage*, bool, bool, bool)>();
|
||||
v_CClient_SendSnapshot = p_CClient_SendSnapshot.RCast<void* (*)(CClient*, CClientFrame*, int, int)>();
|
||||
}
|
||||
virtual void GetVar(void) const
|
||||
{
|
||||
g_pClient = g_GameDll.FindPatternSIMD("3B 15 ?? ?? ?? ?? 7D 33")
|
||||
.FindPatternSelf("48 8D 0D", CMemory::Direction::DOWN, 150).ResolveRelativeAddressSelf(0x3, 0x7).RCast<CClient*>();
|
||||
}
|
||||
virtual void GetVar(void) const { }
|
||||
virtual void GetCon(void) const { }
|
||||
virtual void Attach(void) const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user