From 93b8f48afcdf321fb78f00d3084f0bf68073f52a Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 23 Sep 2024 22:17:18 +0100 Subject: [PATCH] had to remove the if clause because DETOUR_MEMBER_CALL(GiveNamedItem)(pszName, iSubType); only happening inside of it would cause server crashes. probably because of it missing calls that it had to do --- extension.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/extension.cpp b/extension.cpp index 37e93bf..f58b5f8 100644 --- a/extension.cpp +++ b/extension.cpp @@ -57,12 +57,9 @@ DETOUR_DECL_MEMBER2(GiveNamedItem, void, char*, pszName, int, iSubType) if (gp->IsConnected()) { g_ClientIndex[idx]++; - if (g_ClientIndex[idx] <= g_Capacity) - { - smutils->LogMessage(myself, "got inside of DETOUR_DECL_MEMBER2. STEAMID: %s, playername: %s. pszName: %s. iSubType: %i", - g_ClientSteamIDMap[idx], g_ClientNameMap[idx], pszName, iSubType); - DETOUR_MEMBER_CALL(GiveNamedItem)(pszName, iSubType); - } + smutils->LogMessage(myself, "got inside of DETOUR_DECL_MEMBER2. STEAMID: %s, playername: %s. pszName: %s. iSubType: %i. g_ClientIndex[idx]: %i", + g_ClientSteamIDMap[idx], g_ClientNameMap[idx], pszName, iSubType, g_ClientIndex[idx]); + DETOUR_MEMBER_CALL(GiveNamedItem)(pszName, iSubType); } } }