Unassigned variable fix (probably going to rip out the closed caption system out of Kart at some point, but this is good for now).

This commit is contained in:
toaster 2021-10-17 21:52:37 +01:00
parent d5c30742dd
commit 303df77b68

View file

@ -678,9 +678,6 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
sep = (~sep) & 255;
}
// Handle closed caption input.
S_StartCaption(actual_id, cnum, MAXCAPTIONTICS);
// At this point it is determined that a sound can and should be played, so find a free channel to play it on
cnum = S_getChannel(origin, sfx);
@ -689,6 +686,9 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
return; // If there's no free channels, there won't be any for anymore players either
}
// Handle closed caption input.
S_StartCaption(actual_id, cnum, MAXCAPTIONTICS);
// Now that we know we are going to play a sound, fill out this info
channels[cnum].sfxinfo = sfx;
channels[cnum].origin = origin;