diff --git a/r5dev/engine/net.cpp b/r5dev/engine/net.cpp index a21ccc42..a2118d32 100644 --- a/r5dev/engine/net.cpp +++ b/r5dev/engine/net.cpp @@ -135,13 +135,13 @@ void NET_PrintFunc(const char* fmt, ...) // Purpose: shutdown netchannel // Input : *this - // *szReason - -// a3 - +// bBadRep - // bRemoveNow - //----------------------------------------------------------------------------- -void NET_Shutdown(void* thisptr, const char* szReason, uint8_t a1, bool bRemoveNow) +void NET_Shutdown(void* thisptr, const char* szReason, uint8_t bBadRep, bool bRemoveNow) { _DownloadPlaylists_f_CompletionFunc(); // Re-load playlist from disk after getting disconnected from the server. - v_NET_Shutdown(thisptr, szReason, a1, bRemoveNow); + v_NET_Shutdown(thisptr, szReason, bBadRep, bRemoveNow); } //----------------------------------------------------------------------------- @@ -149,10 +149,10 @@ void NET_Shutdown(void* thisptr, const char* szReason, uint8_t a1, bool bRemoveN // Input : *pClient - // nIndex - // *szReason - -// unk1 - -// unk2 - +// bBadRep - +// bRemoveNow - //----------------------------------------------------------------------------- -void NET_DisconnectClient(CBaseClient* pClient, int nIndex, const char* szReason, uint8_t unk1, bool bRemoveNow) +void NET_DisconnectClient(CBaseClient* pClient, int nIndex, const char* szReason, uint8_t bBadRep, bool bRemoveNow) { #ifndef CLIENT_DLL if (!pClient || std::strlen(szReason) == NULL || !pClient->GetNetChan()) @@ -160,7 +160,7 @@ void NET_DisconnectClient(CBaseClient* pClient, int nIndex, const char* szReason return; } - v_NET_Shutdown(pClient->GetNetChan(), szReason, unk1, bRemoveNow); // Shutdown netchan. + v_NET_Shutdown(pClient->GetNetChan(), szReason, bBadRep, bRemoveNow); // Shutdown netchan. pClient->SetNetChan(nullptr); // Null netchan. CBaseClient_Clear(pClient); // Reset CClient instance for client. g_bIsPersistenceVarSet[nIndex] = false; // Reset Persistence var. diff --git a/r5dev/engine/net.h b/r5dev/engine/net.h index 3c566e86..891749f0 100644 --- a/r5dev/engine/net.h +++ b/r5dev/engine/net.h @@ -8,10 +8,10 @@ /* ==== CNETCHAN ======================================================================================================================================================== */ inline CMemory p_NET_Init; -inline auto v_NET_Init = p_NET_Init.RCast(); +inline auto v_NET_Init = p_NET_Init.RCast(); inline CMemory p_NET_Shutdown; -inline auto v_NET_Shutdown = p_NET_Shutdown.RCast(); +inline auto v_NET_Shutdown = p_NET_Shutdown.RCast(); inline CMemory p_NET_SetKey; inline auto v_NET_SetKey = p_NET_SetKey.RCast(); @@ -31,7 +31,7 @@ int NET_SendDatagram(SOCKET s, void* pPayload, int iLenght, v_netadr_t* pAdr, b void NET_SetKey(const string& svNetKey); void NET_GenerateKey(); void NET_PrintFunc(const char* fmt, ...); -void NET_Shutdown(void* thisptr, const char* szReason, uint8_t a1, bool bRemoveNow); +void NET_Shutdown(void* thisptr, const char* szReason, uint8_t bBadRep, bool bRemoveNow); void NET_DisconnectClient(CBaseClient* pClient, int nIndex, const char* szReason, uint8_t unk1, bool bRemoveNow); void NET_Attach(); @@ -69,7 +69,7 @@ class HNetChan : public IDetour p_NET_SendDatagram = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x48\x89\x5C\x24\x08\x48\x89\x6C\x24\x10\x48\x89\x74\x24\x18\x57\x41\x56\x41\x57\x48\x81\xEC\x00\x05\x00\x00"), "xxxxxxxxxxxxxxxxxxxxxxx?xxx"); p_NET_PrintFunc = g_mGameDll.FindPatternSIMD(reinterpret_cast("\x48\x89\x54\x24\x10\x4C\x89\x44\x24\x18\x4C\x89\x4C\x24\x20\xC3\x48"), "xxxxxxxxxxxxxxxxx"); - v_NET_Init = p_NET_Init.RCast(); /*48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 54 41 56 41 57 48 81 EC F0 01 00*/ + v_NET_Init = p_NET_Init.RCast(); /*48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 48 89 7C 24 20 41 54 41 56 41 57 48 81 EC F0 01 00*/ v_NET_Shutdown = p_NET_Shutdown.RCast(); /*48 89 6C 24 18 56 57 41 56 48 83 EC 30 83 B9 D0*/ v_NET_SetKey = p_NET_SetKey.RCast(); /*48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 48 83 EC 20 48 8B F9 41 B8*/ v_NET_ReceiveDatagram = p_NET_ReceiveDatagram.RCast(); /*E8 ?? ?? ?? ?? 84 C0 75 35 48 8B D3*/