Nebual / sandbox-plus

A community fork of Facepunch's Sandbox gamemode for s&box, with tweaks to allow modular addons, like Wirebox, to extend it further
MIT License
15 stars 9 forks source link

[Bug] PhysGun laser sound sometimes doesn't stop when it's supposed to #35

Closed Hri7566 closed 1 year ago

Hri7566 commented 1 year ago

Sometimes, the laser sound of the physics gun doesn't stop and will continue after letting go of attack1.

Temporary fix: stopsound

Hri7566 commented 1 year ago

This also happens rarely with the gravity gun hover sound I added in #24

Nebual commented 1 year ago

I think I fixed this in d45dcc4e5df3ad5e4acd97917ac96f55d3efb81f - Sound.IsPlaying is often wrong for a few ticks after it first starts, which in this case led to us creating multiple sounds at once, with only one of them being tracked and disabled on release.