mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'no-op-zero-length-sounds' into 'master'
Do not play NULL sfx data Closes #226 See merge request KartKrew/Kart!624
This commit is contained in:
commit
d01453b136
1 changed files with 8 additions and 0 deletions
|
|
@ -678,6 +678,14 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
|
|||
if (!sfx->data)
|
||||
{
|
||||
sfx->data = I_GetSfx(sfx);
|
||||
|
||||
if (!sfx->data)
|
||||
{
|
||||
CONS_Alert(CONS_WARNING,
|
||||
"Tried to load invalid sfx_%s\n",
|
||||
sfx->name);
|
||||
return;/* don't play it */
|
||||
}
|
||||
}
|
||||
|
||||
// increase the usefulness
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue