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 multiple voice chat activation modes #1506

Merged
merged 9 commits into from
Apr 11, 2024

Conversation

ruby0b
Copy link
Contributor

@ruby0b ruby0b commented Apr 7, 2024

  • Push-to-Talk (default)
  • Push-to-Mute
  • Toggle
  • Toggle (Activate on Join)

Things left to do that should probably be new PRs:

  • Investigate how keeping voice chat activated interacts with rounds starting/ending
    • The voice chat color should update accordingly. HUD-related changes should probably wait for Voice: Reworked HUD #1473 though
    • I think voice chat might currently get disabled once on round start (but your voice panel keeps being shown)
  • Improve how team voice chat interacts with modes other than push-to-talk
    • I didn't touch the TeamVoice functions which means that currently team voice can only be activated while global voice is off which is obviously silly for PTM/Toggle
  • (Maybe have separate sections (forms) for input and output settings in the Voice & Volume menu)
  • (Move ComboBoxChoicesFromKeys somewhere else since it's just a form creation utility function)

- Push-to-Talk (default)
- Push-to-Mute
- Toggle
- Toggle (Activate on Join)
@ruby0b ruby0b mentioned this pull request Apr 8, 2024
4 tasks
@TimGoll
Copy link
Member

TimGoll commented Apr 8, 2024

The voice chat color should update accordingly. HUD-related changes should probably wait for #1473 though

Right now the voice color is only set once. I could change this in the linked PR though. So it sets a mode (team or global) and the color is set each frame

Improve how team voice chat interacts with modes other than push-to-talk

I'm fine with this being done in a secondary PR. But in general I'm a bit confused. Is this a draft PR? Or are these todos things that should be done in further PRs? Because you say "Things left to do that should probably be new PRs" but also have todos in code, which should be removed

@TimGoll TimGoll added this to the v0.14.0b milestone Apr 8, 2024
@TimGoll TimGoll added the type/enhancement Enhancement or simple change to existing functionality label Apr 8, 2024
@ruby0b
Copy link
Contributor Author

ruby0b commented Apr 8, 2024

I've removed the todo and made the affected utility function local. To clarify, this is not a draft, I just wrote down what interactions with existing code I'd want to change as well (didn't want to do all of that here to prevent merge conflicts).

Regarding voice color, my intuition would've been to somehow hook into role assignment/changing and modify the color then but if updating the color every frame isn't a big deal performance-wise than that's probably a way simpler solution.

@TimGoll
Copy link
Member

TimGoll commented Apr 8, 2024

Regarding voice color, my intuition would've been to somehow hook into role assignment/changing and modify the color then but if updating the color every frame isn't a big deal performance-wise than that's probably a way simpler solution.

All UI elements read the color on a frame by frame basis, so this is fine

gamemodes/terrortown/gamemode/client/cl_voice.lua Outdated Show resolved Hide resolved
gamemodes/terrortown/gamemode/client/cl_voice.lua Outdated Show resolved Hide resolved
lua/terrortown/lang/en.lua Outdated Show resolved Hide resolved
lua/ttt2/extensions/util.lua Outdated Show resolved Hide resolved
Copy link
Member

@saibotk saibotk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a small nit, otherwise very very good!

Thanks for the amazing PR and clean code, that was really nice to review!

gamemodes/terrortown/gamemode/client/cl_voice.lua Outdated Show resolved Hide resolved
lua/terrortown/lang/de.lua Outdated Show resolved Hide resolved
Copy link
Member

@TimGoll TimGoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just a note for the future: Please do not resolve the conversations yourself. We - as the reviewer - close them to keep track of it.

Copy link
Member

@saibotk saibotk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thank you very much 👍

@saibotk saibotk merged commit 273b172 into TTT-2:master Apr 11, 2024
4 checks passed
@ruby0b ruby0b deleted the voice_activation_modes branch April 11, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement or simple change to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants