From 19691ff84f13e778975fb587d086489bd896f437 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Sun, 1 Aug 2010 20:53:20 +0000 Subject: Stop spamming about missing or invalid sounds. Don't try to reload the sound multiple times after an error. Display sound load failure reasons in the output of ‘soundlist’ command. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/snd_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/snd_main.c') diff --git a/source/snd_main.c b/source/snd_main.c index 11c15f0..29e739b 100644 --- a/source/snd_main.c +++ b/source/snd_main.c @@ -112,7 +112,8 @@ static void S_SoundList_f( void ) { if( sfx->name[0] == '*' ) Com_Printf( " placeholder : %s\n", sfx->name ); else - Com_Printf( " not loaded : %s\n", sfx->name ); + Com_Printf( " not loaded : %s (%s)\n", + sfx->name, Q_ErrorString( sfx->error ) ); } } Com_Printf( "Total resident: %i\n", total ); @@ -363,9 +364,7 @@ qhandle_t S_RegisterSound( const char *name ) { sfx = S_FindName( name ); if( !s_registering ) { - if( !S_LoadSound( sfx ) ) { - /*return 0;*/ - } + S_LoadSound( sfx ); } return ( sfx - known_sfx ) + 1; @@ -405,6 +404,7 @@ static sfx_t *S_RegisterSexedSound( int entnum, const char *base ) { // no, revert to the male sound in the pak0.pak Q_concat( buffer, sizeof( buffer ), "player/male/", base + 1, NULL ); + sfx->error = Q_ERR_SUCCESS; sfx->truename = S_CopyString( buffer ); } -- cgit v1.2.3