Let S_StopSound, S_StopSoundByID, S_StopSoundByNum stop multiple sounds

Previously stopped only one, probably the first that
started playing.
This commit is contained in:
James R 2022-09-25 04:39:42 -07:00 committed by toaster
parent 91a424a034
commit fe7e9ec266

View file

@ -398,7 +398,6 @@ void S_StopSoundByID(void *origin, sfxenum_t sfx_id)
if (channels[cnum].sfxinfo == &S_sfx[sfx_id] && channels[cnum].origin == origin)
{
S_StopChannel(cnum);
break;
}
}
}
@ -419,7 +418,6 @@ void S_StopSoundByNum(sfxenum_t sfxnum)
if (channels[cnum].sfxinfo == &S_sfx[sfxnum])
{
S_StopChannel(cnum);
break;
}
}
}
@ -718,7 +716,6 @@ void S_StopSound(void *origin)
if (channels[cnum].sfxinfo && channels[cnum].origin == origin)
{
S_StopChannel(cnum);
break;
}
}
}