diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/snd_dma.c | 5 | ||||
-rw-r--r-- | src/client/snd_mem.c | 5 | ||||
-rw-r--r-- | src/client/snd_openal.c | 9 |
3 files changed, 10 insertions, 9 deletions
diff --git a/src/client/snd_dma.c b/src/client/snd_dma.c index 8aca94ce..369c9388 100644 --- a/src/client/snd_dma.c +++ b/src/client/snd_dma.c @@ -272,6 +272,11 @@ static sfx_t *S_FindName( const char *name ) { return NULL; } + if (name[0] == '*') { + Com_Printf( S_COLOR_YELLOW "WARNING: Tried to load player sound directly: %s\n", name ); + return NULL; + } + hash = S_HashSFXName(name); sfx = sfxHash[hash]; diff --git a/src/client/snd_mem.c b/src/client/snd_mem.c index 00dbcf3a..ecca5292 100644 --- a/src/client/snd_mem.c +++ b/src/client/snd_mem.c @@ -209,11 +209,6 @@ qboolean S_LoadSound( sfx_t *sfx ) snd_info_t info; int size_per_sec; - // player specific sounds are never directly loaded - if ( sfx->soundName[0] == '*') { - return qfalse; - } - // load it in data = S_CodecLoad(sfx->soundName, &info); if(!data) diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c index 23a6a67d..b7ce3f0f 100644 --- a/src/client/snd_openal.c +++ b/src/client/snd_openal.c @@ -211,6 +211,11 @@ static sfxHandle_t S_AL_BufferFind(const char *filename) return 0; } + if ( filename[0] == '*' ) { + Com_Printf( S_COLOR_YELLOW "WARNING: Tried to load player sound directly: %s\n", filename ); + return 0; + } + for(i = 0; i < numSfx; i++) { if(!Q_stricmp(knownSfx[i].filename, filename)) @@ -328,10 +333,6 @@ static void S_AL_BufferLoad(sfxHandle_t sfx, qboolean cache) if(curSfx->filename[0] == '\0') return; - // Player SFX - if(curSfx->filename[0] == '*') - return; - // Already done? if((curSfx->inMemory) || (curSfx->isDefault) || (!cache && curSfx->isDefaultChecked)) return; |