Browse Source

engine: common: custom: increased custom decal size limit to 128Kb, added wrong size warning

pull/2/head
SNMetamorph 2 years ago committed by Alibek Omarov
parent
commit
49d93c0e76
  1. 6
      engine/common/custom.c

6
engine/common/custom.c

@ -101,7 +101,7 @@ qboolean COM_CreateCustomization( customization_t *pListHead, resource_t *pResou @@ -101,7 +101,7 @@ qboolean COM_CreateCustomization( customization_t *pListHead, resource_t *pResou
{
if( !FBitSet( flags, FCUST_IGNOREINIT ))
{
if( pResource->nDownloadSize >= (1 * 1024) && pResource->nDownloadSize <= ( 16 * 1024 ))
if( pResource->nDownloadSize >= (1 * 1024) && pResource->nDownloadSize <= ( 128 * 1024 ))
{
pCust->bTranslated = true;
pCust->nUserData1 = 0;
@ -112,6 +112,10 @@ qboolean COM_CreateCustomization( customization_t *pListHead, resource_t *pResou @@ -112,6 +112,10 @@ qboolean COM_CreateCustomization( customization_t *pListHead, resource_t *pResou
else pCust->pInfo = NULL;
if( nLumps ) *nLumps = 1;
}
else
{
Con_Printf( S_WARN "Ignoring custom decal \"%s\": wrong size (%i bytes)\n", pResource->szFileName, pResource->nDownloadSize );
}
}
}
}

Loading…
Cancel
Save