Commit graph

31 commits

Author SHA1 Message Date
Eidolon
cb7f437e60 Merge public master 2025-02-13 15:48:11 -06:00
Eidolon
a4d304a1f5 Update copyright years to 2025 2025-02-13 15:32:26 -06:00
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
Antonio Martinez
bac60e3af8 Improve descriptive zvote offsetting 2024-09-27 15:43:19 -07:00
Antonio Martinez
88bd460cde Fix midvote wrong coords (resolves mystery keyboard patch in tutorial) 2024-09-27 03:28:39 -07:00
Antonio Martinez
9eaf53b11f Misc menu fixups 2024-09-27 03:28:39 -07:00
Antonio Martinez
81d6ac9f6e FUCK A DRAWBUTTON 2024-09-27 03:28:39 -07:00
Sally Coolatta
25634d81f2 Use HU_AddChatText for voter dox
While we aren't fully consistent on this, anything that is player facing (not a debug feature or power user tool) should never use console prints. `HU_AddChatText` should still do logging for dedicated servers to see it.
2024-08-28 17:44:14 -04:00
Antonio Martinez
c4f314f8af Also dox to admins 2024-08-24 20:36:20 -07:00
Antonio Martinez
7114d966c1 Dox voters to server 2024-08-24 20:34:06 -07: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
AJ Martinez
fcdca8c9c9 WIP: z-vote SFX 2024-03-10 17:19:36 -07:00
Sally Coolatta
9b93f56111 Add pre-Podium intermission music 2024-03-10 14:08:59 -04:00
James R
4ee00d4333 Pass const pointer to all netxcmd handlers
Ensure buffer data is read-only and not modified by
handler
2024-02-11 05:42:07 -08:00
Eidolon
bdc0795704 Fix several Clang compile warnings 2024-01-16 06:11:43 -05:00
James R
6c0b042eed Refactor cvar definitions completely, move everything to cvars.cpp
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
2023-08-25 17:22:40 -07:00
toaster
c5dc430b50 V_6WIDTHSPACE no longer a pitfall for using V_DrawThinString
The bunched text behaviour is now the primary mode of operation for TINY_FONT.
2023-07-12 09:00:29 +01:00
toaster
a536f884ce V_ALLOWLOWERCASE --> V_FORCEUPPERCASE
Content of commit was originally written by Sal, but as a monolithic commit. The author of this commit is chunking it up for easier review.

Simple inversion on the face of things, but with a long tail of consequences, including 19 changed files.

Forced uppercase has been applied in a handful of locations where it was aesthetically imperative. Most menus will follow in another commit, so that that may be reverted if we change the default menu font.
2023-07-12 09:00:29 +01:00
VelocitOni
2c67244954 RTV and RIB default to Yes
"Skip Map" and "Redo Map" on by default for Z-Voting
2023-06-27 20:37:55 -04:00
toaster
685e1b019f Actually pay attention to K_PlayerIDAllowedInMidVote for access to calling votes 2023-06-27 23:59:46 +01: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
8a4cca8518 Seperate out K_SendCallMidVote from Command_CallVote 2023-06-27 17:33:01 +01:00
toaster
ddce2e9a2d zvote_call runitback
- "Redo Level?"
- Functionally `restartlevel` but votable
2023-06-27 14:24:45 +01:00
toaster
ec8a6247c2 Z-vote is now server-authoriative
- Only calls callback if you're the server (and not demo.playback, forward thinking for stored xcmd netreplays)
- G_GamestateUsesExitLevel() for homogenising the conditions that permit XD_EXITLEVEL to be dispatched and recieved
2023-06-27 14:16:48 +01:00
Sally Coolatta
a631376f1f Z Voting: Undo victim thing 2023-04-23 01:12:19 -04:00
Sally Coolatta
f86030fcda Z Voting: More voting conditions
- Attempt to make Z votes draw if spectator
- Don't show kick votes to the victim
- Fix required vote count when in 1P
2023-04-23 01:04:57 -04:00
Sally Coolatta
e112e1f0dc Reduce length & delay 2023-04-23 00:40:31 -04: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
49b1ecddff Z Voting: Address toaster review 2023-04-20 20:49:39 -04:00
Sally Coolatta
65d6877283 Z Voting: Remove debug prints 2023-04-20 16:00:38 -04:00
Sally Coolatta
996ca9adad Z Voting 2023-04-20 15:55:38 -04:00