Skip to content

Bug: Music cannot be stopped when loading a save #1874

Description

@trishgerlerdia

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

  1. Open sp_a3_jump_intro (as an example)
  2. Make a save in the first chamber once the music starts playing and load it
  3. 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.
  4. 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:

  1. Make a map with an ambient_generic set to play looping music (any will suffice)
  2. Place two prop_buttons, one to start and one to stop the music.
  3. Saving and loading while the music is playing will make the music unable to be stopped.
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugThis is a problem with something that should be working one way, but isn't.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions