2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-02-05 02:00:34 +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; pCust->nUserData2 = nLumps;
gEntityInterface.pfnPlayerCustomization(pHost->edict, pCust); gEntityInterface.pfnPlayerCustomization(pHost->edict, pCust);
#ifdef REHLDS_FIXES
SV_Customization(pHost, pResource, TRUE);
#endif
} }
else else
{ {
@ -205,10 +208,6 @@ void SV_RegisterResources(void)
pHost->uploading = FALSE; pHost->uploading = FALSE;
#ifdef REHLDS_FIXES #ifdef REHLDS_FIXES
SV_CreateCustomizationList(pHost); // FIXED: Call this function only once. It was crazy to call it for each resource available. 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 #else // REHLDS_FIXES
for (pResource = pHost->resourcesonhand.pNext; pResource != &pHost->resourcesonhand; pResource = pResource->pNext) for (pResource = pHost->resourcesonhand.pNext; pResource != &pHost->resourcesonhand; pResource = pResource->pNext)
{ {