Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fixed] Bugs when spawning a music #2272

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Dec 26, 2024

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

Fixes #1309

After this PR, you cannot spawn a ctf_music, music, war_music or challenge_music if one of these already exists.

Fixes bugs that occur when multiple music blobs exist (music getting cut off over and over).

I removed mixer.ResetMixer(); from CTFMusic.as onInit() because the other music scripts also don't have it and it is used in AddGameMusic(CBlob@ this, CMixer@ mixer) already.

Tested in offline and online, found no problems.
When a CTF match ends and the new map loads, music will correctly start playing again.

Alternative Solutions

This Pr might not be a good solution but I only aimed to fix the issue. There could be other possible solutions.

a) Replacing the existing music
It might be possible to write logic for replacing the existing music but it requires more time and research.

b) Blacklisting
Alternative to this PR would be to just put music blobs on the server's chat spawn command black list.

c) Is it possible to use a rules script instead of blob scripts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugs when spawning a new music
1 participant