Facepunch / sbox-issues

176 stars 12 forks source link

Allow us to trigger voice chat ourselves #3161

Closed matekdev closed 1 year ago

matekdev commented 1 year ago

What it is?

Right now, voice chat is triggered automatically somewhere in engine depending on which key you assign "voice". What if, your game had two forms of communication, one button that would voice chat to everyone, and another button that chats to your team. This is currently impossible with the current setup.

What should it be?

Voice chat is the only button that is not called within our games code, I think it probably should be. Give us the ability to trigger voice chat using an input button somewhere in the game loop. I would remove CanHearPlayerVoice and instead allow us to pass in the clients that should receive the incoming voice chat. For instance...

if (Input.Pressed("team_voice")
{
    SendVoice(To.Single(...)); // Similar to how clientrpcs work
}

I'm open to hear your thoughts and feedback.

trende2001 commented 1 year ago

i agree, but i think it should be hardcoded to a certain keybind and not allowed to be binded on any other key

sanny-io commented 1 year ago

There should be no such thing. This is rife for abuse like how it was in gmod. Imagine having a private conversation only to find out it's been secretly being broadcasted to the whole server or recorded.

matekdev commented 1 year ago

Yeah that makes sense, I'd suggest either some obvious indicator in-game to let the player know their microphone is being used.

Otherwise yeah, the privacy issue is a big problem here. I know the windows taskbar indicator when a microphone is being used. But, I don't believe that is enough indication imo.

I can totally understand skipping out on something like this and forcing the bind to a single button. I'll leave this issue up and let the fp devs decide.

DevulTj commented 1 year ago

for now, let's not - maybe we'll go against this in a year's time