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

This commit is contained in:
jenz 2024-09-23 22:17:18 +01:00
parent 8c58b35501
commit 93b8f48afc

View File

@ -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);
}
}
}