Commit graph

6 commits

Author SHA1 Message Date
Eidolon
22b20b5877 Add netgame voice chat
Implemented using libopus for the Opus codec, same as is used in Discord.
This adds the following cvars:

- `voice_chat` On/Off, triggers self-deafen state on server via weaponprefs
- `voice_mode` Activity/PTT
- `voice_selfmute` On/Off, triggers self-mute state on server via weaponprefs
- `voice_inputamp` -30 to 30, scales input by value in decibels
- `voice_activationthreshold` -30 to 0, if any peak in a frame is higher, activates voice
- `voice_loopback` On/Off, plays back local transcoded voice
- `voice_proximity` On/Off, enables proximity effects for server
- `voice_distanceattenuation_distance` distance in fracunits to scale voice volume over
- `voice_distanceattenuation_factor` distance in logarithmic factor to scale voice volume by distance to. e.g. 0.5 for "half as loud" at or above max distance
- `voice_stereopanning_factor` at 1.0, player voices are panned to left or right speaker, scaling to no effect at 0.0
- `voice_concurrentattenuation_factor` the logarithmic factor to attenuate player voices with concurrent speakers
- `voice_concurrentattenuation_min` the minimum concurrent speakers before global concurrent speaker attenuation
- `voice_concurrentattenuation_max` the maximum concurrent speakers for full global concurrent speaker attenuation
- `voice_servermute` whether voice chat is enabled on this server. visible from MS via bitflag
- `voicevolume` local volume of all voice playback

A Voice Options menu is added with a subset of these options, and Server Options has server mute.
2024-12-13 17:12:14 -06:00
Sally Coolatta
7dfa597c7d SRB2 -> DRRR copyright in src, acs, android folder
Be consistent with toaster's recent changes to copyright
2024-04-05 02:08:23 -04:00
toaster
d8ea8c0fe1 Implement "CALL VOTE" for victimless commands on the pause menu
Currently just plays the squishy "nope" sound for "KICK PLAYER?", all others are functional
Shows whether vote is active or the cooldown is too recent (via numerical timer) as reasons for why you can't select it
2023-06-27 17:53:59 +01:00
toaster
ddce2e9a2d zvote_call runitback
- "Redo Level?"
- Functionally `restartlevel` but votable
2023-06-27 14:24:45 +01:00
Sally Coolatta
68916559aa Z Voting: Kick handling improvements
- If a player being voted against leaves before it finishes, then properly activate their penalty.
    - This is handled with a special case for MVT_KICK (let's not even attempt to SendKick(self) during Got_Kick :p), but any possible future vote types that use a victim will simply call K_MidVoteSuccess.
- Actually define behavior for KICK_MSG_VOTE_KICK.
- Default kicktime is now 20 minutes instead of 10.
- Read custom reasons before possibly overriding msg type. Prevents a rare invalid read pointer.
2023-04-20 21:11:25 -04:00
Sally Coolatta
996ca9adad Z Voting 2023-04-20 15:55:38 -04:00