mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 13:51:45 +08:00
filesystem: add support for zip files
This commit is contained in:
@@ -1206,7 +1206,7 @@ static qboolean CL_LoadHudSprite( const char *szSpriteName, model_t *m_pSprite,
|
||||
SetBits( m_pSprite->flags, MODEL_CLIENT );
|
||||
m_pSprite->numtexinfo = texFlags; // store texFlags into numtexinfo
|
||||
|
||||
if( FS_FileSize( szSpriteName, false ) == -1 )
|
||||
if( !FS_FileExists( szSpriteName, false ) )
|
||||
{
|
||||
if( cls.state != ca_active && cl.maxclients > 1 )
|
||||
{
|
||||
|
||||
@@ -551,23 +551,20 @@ int CL_EstimateNeededResources( void )
|
||||
{
|
||||
resource_t *p;
|
||||
int nTotalSize = 0;
|
||||
int nSize;
|
||||
|
||||
for( p = cl.resourcesneeded.pNext; p != &cl.resourcesneeded; p = p->pNext )
|
||||
{
|
||||
switch( p->type )
|
||||
{
|
||||
case t_sound:
|
||||
nSize = FS_FileSize( va( "%s%s", DEFAULT_SOUNDPATH, p->szFileName ), false );
|
||||
if( p->szFileName[0] != '*' && nSize == -1 )
|
||||
if( p->szFileName[0] != '*' && !FS_FileExists( va( "%s%s", DEFAULT_SOUNDPATH, p->szFileName ), false ) )
|
||||
{
|
||||
SetBits( p->ucFlags, RES_WASMISSING );
|
||||
nTotalSize += p->nDownloadSize;
|
||||
}
|
||||
break;
|
||||
case t_model:
|
||||
nSize = FS_FileSize( p->szFileName, false );
|
||||
if( p->szFileName[0] != '*' && nSize == -1 )
|
||||
if( p->szFileName[0] != '*' && !FS_FileExists( p->szFileName, false ) )
|
||||
{
|
||||
SetBits( p->ucFlags, RES_WASMISSING );
|
||||
nTotalSize += p->nDownloadSize;
|
||||
@@ -576,8 +573,7 @@ int CL_EstimateNeededResources( void )
|
||||
case t_skin:
|
||||
case t_generic:
|
||||
case t_eventscript:
|
||||
nSize = FS_FileSize( p->szFileName, false );
|
||||
if( nSize == -1 )
|
||||
if( !FS_FileExists( p->szFileName, false ) )
|
||||
{
|
||||
SetBits( p->ucFlags, RES_WASMISSING );
|
||||
nTotalSize += p->nDownloadSize;
|
||||
|
||||
Reference in New Issue
Block a user