summaryrefslogtreecommitdiff
path: root/source/snd_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-08-01 20:53:20 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-08-01 20:53:20 +0000
commit19691ff84f13e778975fb587d086489bd896f437 (patch)
tree0c90c3f912e153d38d3ad8e86ee263c594fea660 /source/snd_main.c
parent9a0fcb9662bbcf809318a6fcf84b4798efeeabcc (diff)
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.
Diffstat (limited to 'source/snd_main.c')
-rw-r--r--source/snd_main.c8
1 files changed, 4 insertions, 4 deletions
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 );
}