twhl-community/halflife-updated

Egon attack sound gets cut when using the flashlight

Closed this issue · 1 comments

https://youtu.be/xThWe-3ic44

Turning the flashlight ON or OFF while firing the egon gun results in attack sound getting cut off briefly.

That's because both sounds are played on the player entity's weapon sound channel. Entities have a few sound channels each but only one sound can play on a given channel at any time. There is also an overall limit to the number of active channels across all entities so this can happen if enough sounds are started by other entities as well.

It can't be fixed without completely replacing the sound system (as the Unified SDK does) and redesigning the sound channel system which requires more than 500 references to be updated. This would involve reworking how sounds are started and stopped since a lot of code depends on sounds being stopped by another sound starting on the same channel.

That's well out of scope for either project, so it will remain as it is.