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 authored and toaster committed 2022-12-17 13:12:19 +00:00
1 parent 91a424a034
commit fe7e9ec266
1 file changed
-3
-3
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;
}
}
}