fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

Fix unreliable Sounds index retrieval

Open JohnAFernandez opened this issue 1 year ago • 1 comments

Our sound code is extremely confusing, so it's no wonder that the author of these functions could not find snd_get_sound_id, which is the handle into the Sounds vector. And it's no wonder that it was missed in review either.

Also some cleanup in the main function that was causing #5899

Fixes #5899

EDIT: By the way, I would love if someone could double check my tests and make sure doors are working as they are supposed to.

JohnAFernandez avatar Jul 05 '24 04:07 JohnAFernandez

Oh nice work. I added this assert when I couldn't figure out the root cause... Having worked in the sound code, I do not envy the headache this probably caused you while figuring it out.

I took a cursory look at the changes and it looks good so far based on what I can remember. I'll give it a real review in the AM if no one else does first.

MjnMixael avatar Jul 05 '24 05:07 MjnMixael