mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Better sound fix
git-svn-id: https://svn.eduke32.com/eduke32@554 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
3fcc3771bd
commit
66538686e2
2 changed files with 7 additions and 3 deletions
|
@ -1239,9 +1239,7 @@ static void movefx(void)
|
|||
if (p == myconnectindex && ps[p].cursectnum == s->sectnum)
|
||||
{
|
||||
j = s->lotag+((unsigned)global_random%(s->hitag+1));
|
||||
if (j < NUM_SOUNDS && sounds[j])
|
||||
sound(j);
|
||||
else OSD_Printf("WARNING: invalid sound #%d\n",j);
|
||||
sound(j);
|
||||
T5 = 26*40 + (global_random%(26*40));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -414,6 +414,12 @@ void sound(int num)
|
|||
if (VoiceToggle==0 && (soundm[num]&4)) return;
|
||||
if ((soundm[num]&8) && ud.lockout) return;
|
||||
if (FX_VoiceAvailable(soundpr[num]) == 0) return;
|
||||
if (num > NUM_SOUNDS-1 || !sounds[num])
|
||||
{
|
||||
OSD_Printf("WARNING: invalid sound #%d\n",num);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
pitchs = soundps[num];
|
||||
pitche = soundpe[num];
|
||||
|
|
Loading…
Reference in a new issue