Skip to content

Commit

Permalink
Do not send customizations list on duplicate or missing resource
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Mar 18, 2024
1 parent 59ed3f6 commit f26ad71
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rehlds/engine/sv_upld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit f26ad71

Please sign in to comment.