mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-24 04:29:34 -04:00
don't try to load again sound lumps that unce failed to load
This commit is contained in:
parent
95cde386eb
commit
5eb640fd03
@ -170,7 +170,7 @@ static boolean CacheSound(sfxinfo_t *sfx, int channel, int pitch)
|
||||
|
||||
lumpnum = I_GetSfxLumpNum(sfx);
|
||||
|
||||
if (lumpnum == -1)
|
||||
if (lumpnum < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -269,6 +269,7 @@ static boolean CacheSound(sfxinfo_t *sfx, int channel, int pitch)
|
||||
|
||||
if (sfx->data == NULL)
|
||||
{
|
||||
sfx->lumpnum = -2; // [FG] don't try again
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2097,8 +2097,8 @@ static void P_SecretRevealed(player_t *player)
|
||||
|
||||
if (sfx_id == -1)
|
||||
{
|
||||
sfx_id = I_GetSfxLumpNum(&S_sfx[sfx_secret]) != -1 ? sfx_secret :
|
||||
I_GetSfxLumpNum(&S_sfx[sfx_itmbk]) != -1 ? sfx_itmbk :
|
||||
sfx_id = I_GetSfxLumpNum(&S_sfx[sfx_secret]) >= 0 ? sfx_secret :
|
||||
I_GetSfxLumpNum(&S_sfx[sfx_itmbk]) >= 0 ? sfx_itmbk :
|
||||
-2;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user