Drop sounds starting with * before allocating sfx slot
Causes handle 0 to be returned by S_RegisterSound.
This commit is contained in:
parent
e4227d1cd5
commit
a836c2db89
3 changed files with 10 additions and 9 deletions
|
@ -271,6 +271,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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue