mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
When sounds can't be found, don't spam the same message over and over again.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2401 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
83bcdc0cc7
commit
dc4ca9b290
5 changed files with 16 additions and 0 deletions
|
@ -922,6 +922,7 @@ void CL_ClearState (void)
|
||||||
CL_AllowIndependantSendCmd(false); //model stuff could be a problem.
|
CL_AllowIndependantSendCmd(false); //model stuff could be a problem.
|
||||||
|
|
||||||
S_StopAllSounds (true);
|
S_StopAllSounds (true);
|
||||||
|
S_ResetFailedLoad();
|
||||||
|
|
||||||
Cvar_ApplyLatches(CVAR_SERVEROVERRIDE);
|
Cvar_ApplyLatches(CVAR_SERVEROVERRIDE);
|
||||||
|
|
||||||
|
|
|
@ -432,6 +432,7 @@ void CL_FinishDownload(char *filename, char *tempname)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
S_ResetFailedLoad(); //okay, so this can still get a little spammy in bad places...
|
||||||
|
|
||||||
//this'll do the magic for us
|
//this'll do the magic for us
|
||||||
Skin_FlushSkin(filename);
|
Skin_FlushSkin(filename);
|
||||||
|
|
|
@ -720,6 +720,13 @@ sfx_t *S_FindName (char *name)
|
||||||
return sfx;
|
return sfx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void S_ResetFailedLoad(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0 ; i < num_sfx ; i++)
|
||||||
|
known_sfx[i].failedload = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==================
|
==================
|
||||||
|
|
|
@ -785,6 +785,9 @@ sfxcache_t *S_LoadSound (sfx_t *s)
|
||||||
|
|
||||||
char *name = s->name;
|
char *name = s->name;
|
||||||
|
|
||||||
|
if (s->failedload)
|
||||||
|
return NULL; //it failed to load once before, don't bother trying again.
|
||||||
|
|
||||||
// see if still in memory
|
// see if still in memory
|
||||||
sc = Cache_Check (&s->cache);
|
sc = Cache_Check (&s->cache);
|
||||||
if (sc)
|
if (sc)
|
||||||
|
@ -854,6 +857,7 @@ sfxcache_t *S_LoadSound (sfx_t *s)
|
||||||
{
|
{
|
||||||
//FIXME: check to see if qued for download.
|
//FIXME: check to see if qued for download.
|
||||||
Con_DPrintf ("Couldn't load %s\n", namebuffer);
|
Con_DPrintf ("Couldn't load %s\n", namebuffer);
|
||||||
|
s->failedload = true;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -866,6 +870,8 @@ sfxcache_t *S_LoadSound (sfx_t *s)
|
||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s->failedload = true;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ typedef struct {
|
||||||
typedef struct sfx_s
|
typedef struct sfx_s
|
||||||
{
|
{
|
||||||
char name[MAX_OSPATH];
|
char name[MAX_OSPATH];
|
||||||
|
qboolean failedload; //no more super-spammy
|
||||||
cache_user_t cache;
|
cache_user_t cache;
|
||||||
sfxdecode_t *decoder;
|
sfxdecode_t *decoder;
|
||||||
} sfx_t;
|
} sfx_t;
|
||||||
|
|
Loading…
Reference in a new issue