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

Add explosive fizzle sound #1082

Merged
merged 4 commits into from Oct 27, 2020
Merged

Add explosive fizzle sound #1082

merged 4 commits into from Oct 27, 2020

Conversation

braem
Copy link
Member

@braem braem commented Oct 26, 2020

Closes #1048

Adds explosive fizzle sounds to CMomExplosive's. Default sound is on the quiet end and is just a placeholder for when we make a custom sound.

Adds a Fizzle() virtual function to CMomExplosive and removed the field from Destroy. Fizzle destroys the explosive, then plays the fizzle sprite and sound.
Fizzle sounds for specific weapons are easy to add; just override GetFizzleSound() with the sound script.

Also cleans up the stickybomb launcher and stickybomb code:

  • Removes the bFizzle field from DetonateRemoteStickybombs in the launcher. Fizzling code is mostly in the stickybomb and this function was never called with this field as true.
  • Removes m_bFizzle in the stickybomb code. Seems like this was used to interface with DetonateRemoteStickybombs and has been superseded by m_bCanExplode.

https://cdn.discordapp.com/attachments/722911100303048734/770091900383526922/2020-10-25_17-50-07.mp4
https://cdn.discordapp.com/attachments/722911100303048734/770092009641213972/2020-10-25_17-47-38.mp4
https://cdn.discordapp.com/attachments/722911100303048734/770091970919399524/2020-10-25_17-49-33.mp4

Checklist

  • I have thoroughly tested all of the code I have modified/added/removed to ensure something else did not break
  • If there is a localization token change, I have updated the momentum_english_ref.res file with the changes, ran tokenizer.py to generate an up-to-date localization file, and have committed both the .res file changes and the new localization .txt file
  • If I introduced new h/cpp files, I have added them to the appropriate project's VPC file (server_momentum.vpc / client_momentum.vpc / etc)
  • If I have added or modified any visual assets (models, materials, panels, effects, etc), I have taken screenshots / videos of them and attached them to this PR directly (screenshots uploaded through github, videos uploaded to youtube and linked)
  • If I have modified any console command, console variable, or momentum entity, I have opened an issue (or a PR) for it in the Momentum Mod documentation repository
  • My commits are relatively small and scoped to the best of my ability
  • My branch has a clear history of changes that can be easy to follow when being reviewed commit-by-commit
  • My branch is functionally complete; the only changes to be done will be those potentially requested in code review

brae added 2 commits October 25, 2020 16:23
Fizzling on detonate is done in the stickybomb code. Turns out this was never called with "true" anyways.
This is now unused. Seems `CanExplode` takes over the functionality.
brae added 2 commits October 26, 2020 17:01
Replaces `Destroy(true)`. Removed param from `Destroy` as it's not needed. Switched over references of `Destroy(true)` to `Fizzle()`.
@Gocnak Gocnak merged commit 62a7a69 into develop Oct 27, 2020
@Gocnak Gocnak deleted the enh/fizzle-sound branch October 27, 2020 02:25
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.

Add ability to have explosive fizzle sound
2 participants