2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-02-04 17:50:36 +03:00

Do not send customizations list on duplicate or missing resource

This commit is contained in:
s1lentq 2024-03-18 22:09:18 +07:00
parent 59ed3f6867
commit f26ad71aba

View File

@ -138,6 +138,9 @@ void SV_CreateCustomizationList(client_t *pHost)
{
pCust->nUserData2 = nLumps;
gEntityInterface.pfnPlayerCustomization(pHost->edict, pCust);
#ifdef REHLDS_FIXES
SV_Customization(pHost, pResource, TRUE);
#endif
}
else
{
@ -205,10 +208,6 @@ void SV_RegisterResources(void)
pHost->uploading = FALSE;
#ifdef REHLDS_FIXES
SV_CreateCustomizationList(pHost); // FIXED: Call this function only once. It was crazy to call it for each resource available.
for (pResource = pHost->resourcesonhand.pNext; pResource != &pHost->resourcesonhand; pResource = pResource->pNext)
{
SV_Customization(pHost, pResource, TRUE);
}
#else // REHLDS_FIXES
for (pResource = pHost->resourcesonhand.pNext; pResource != &pHost->resourcesonhand; pResource = pResource->pNext)
{