Bug: func_movelinear indefinitely plays moving noise if movement is interrupted before stopping
Describe the bug
When a func_movelinear starts moving, it will play a movement sound and loop it until it stops. However, if this movement is interrupted (i.e. firing the Open input while in the middle of closing, or vice versa), it will not register this as stopping, and will indefinitely loop the moving sound.
If done multiple times to the same brush, it will stack more and more of the same looping sound at once.
https://github.com/StrataSource/Engine/assets/33504404/96ce9cf6-db1f-47c2-a123-8d3c85cdc7c3
Something worth noting is that it appears to happen based on whether or not you're using a raw sound, or a game sound.
Specifically, with HL2 mounted:
Using apc_engine_start and apc_engine_stop game sounds will cause the indefinite playback.
However, using the raw sound files of those game sounds, vehicles/apc/apc_start_loop3.wav and vehicles/apc/apc_shutdown.wav instead, the bug doesn't occur.
To Reproduce
- Open map
- Step on button to move
func_movelinear - If you interrupt the state of the
func_movelinearduring motion, the movement sound will play forever.
Issue Map
funcmovelinearbug.zip The assets of this map are all included in Portal 2 / P2CE by default.
Expected Behavior
The looping sound should cut itself off when the func_movelinear stops moving.
Operating System
win11