Describe the bug
When playing a looping sound (for example, music) from an ambient_generic entity, saving then loading causes the sound to loop indefinitely even if the StopSound input is triggered until a new map is loaded.
To Reproduce
- Open
sp_a3_jump_intro (as an example)
- Make a save in the first chamber once the music starts playing and load it
- Progress normally. When you leave the first chamber the music will not stop even though the ambient_generic that's supposed to be playing the music's
StopSound input was fired.
- Progressing to the second chamber causes the second chamber's music to overlap the music from the first chamber. This does not happen if the save was not loaded.
Alternatively, you can:
- Make a map with an ambient_generic set to play looping music (any will suffice)
- Place two
prop_buttons, one to start and one to stop the music.
- Saving and loading while the music is playing will make the music unable to be stopped.
- In this state, press the stop button to fire the StopSound input. Then press the start button and the music will overlap itself.
You can also use the map linked below.
Issue Map
Affects every map, but can be demonstrated best in sp_a3_jump_intro and sp_a4_test where the music switched halfway in between.
I also made an example map where this can be seen in action:
music_example.zip
Expected Behavior
Firing the StopSound input after loading a save stops the music, which would also fix the music overlapping issue.
Operating System
Windows 11
Describe the bug
When playing a looping sound (for example, music) from an ambient_generic entity, saving then loading causes the sound to loop indefinitely even if the StopSound input is triggered until a new map is loaded.
To Reproduce
sp_a3_jump_intro(as an example)StopSoundinput was fired.Alternatively, you can:
prop_buttons, one to start and one to stop the music.You can also use the map linked below.
Issue Map
Affects every map, but can be demonstrated best in
sp_a3_jump_introandsp_a4_testwhere the music switched halfway in between.I also made an example map where this can be seen in action:
music_example.zip
Expected Behavior
Firing the
StopSoundinput after loading a save stops the music, which would also fix the music overlapping issue.Operating System
Windows 11