Regalis11 / scpcb

SCP - Containment Breach
354 stars 101 forks source link

Stream channels fix #2 #212

Closed Jabka666 closed 1 year ago

Jabka666 commented 1 year ago

Note:

Regalis11 commented 1 year ago

There is a lot of code duplication here: e.g. stopping/removing/dereferencing sounds could've been consolidated to a single function, as well as checking if the channel is non-zero before trying to pause/resume it. But it is still an improvement over the old code, and the fixes seem to work, so I'll go ahead and merge this.

Jabka666 commented 1 year ago

I'm gonna improve that by removing CHN <> 0 checking. Any channel function returns a null parameter, so we don't need to check if channel exists. ChannelPlaying will be used instead and only for loops