Browse Source

engine: client: hide late precache warning under s_warn_late_precache cvar

This warn is valid mostly for multiplayer games.
In singleplayer games, this is a false-positive as sentences are hot loaded
pull/2/head
Alibek Omarov 3 years ago
parent
commit
6571c78ed4
  1. 2
      engine/client/s_load.c
  2. 1
      engine/client/s_main.c
  3. 1
      engine/client/sound.h

2
engine/client/s_load.c

@ -141,7 +141,7 @@ wavdata_t *S_LoadSound( sfx_t *sfx ) @@ -141,7 +141,7 @@ wavdata_t *S_LoadSound( sfx_t *sfx )
if( Q_stricmp( sfx->name, "*default" ))
{
// load it from disk
if( host_developer.value > 0 && CL_Active() )
if( s_warn_late_precache.value > 0 && CL_Active() )
Con_Printf( S_WARN "S_LoadSound: late precache of %s\n", sfx->name );
if( sfx->name[0] == '*' )

1
engine/client/s_main.c

@ -46,6 +46,7 @@ static CVAR_DEFINE_AUTO( s_combine_sounds, "0", FCVAR_ARCHIVE, "combine channels @@ -46,6 +46,7 @@ static CVAR_DEFINE_AUTO( s_combine_sounds, "0", FCVAR_ARCHIVE, "combine channels
CVAR_DEFINE_AUTO( snd_mute_losefocus, "1", FCVAR_ARCHIVE, "silence the audio when game window loses focus" );
CVAR_DEFINE_AUTO( s_test, "0", 0, "engine developer cvar for quick testing new features" );
CVAR_DEFINE_AUTO( s_samplecount, "0", FCVAR_ARCHIVE, "sample count (0 for default value)" );
CVAR_DEFINE_AUTO( s_warn_late_precache, "0", FCVAR_ARCHIVE, "warn about late precached sounds on client-side" );
/*
=============================================================================

1
engine/client/sound.h

@ -222,6 +222,7 @@ extern convar_t *dsp_off; @@ -222,6 +222,7 @@ extern convar_t *dsp_off;
extern convar_t s_test; // cvar to testify new effects
extern convar_t s_samplecount;
extern convar_t snd_mute_losefocus;
extern convar_t s_warn_late_precache;
void S_InitScaletable( void );
wavdata_t *S_LoadSound( sfx_t *sfx );

Loading…
Cancel
Save