From c3482ee779f1ba6a1c70b4efc0ce25edf479ffb7 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 20:08:44 -0400 Subject: [PATCH 01/14] Base Online Menu "Advertise" Rewording "Advertise" --> "Public" --- src/menus/play-online-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menus/play-online-host.c b/src/menus/play-online-host.c index ccc3214c2..18026a836 100644 --- a/src/menus/play-online-host.c +++ b/src/menus/play-online-host.c @@ -46,7 +46,7 @@ static void draw_routine(void) 294 + tx, 98, !CV_IsSetToDefault(&cv_advertise) ? warningflags : highlightflags, - va("(Advertise: %s)", cv_advertise.string) + va("(Public: %s)", cv_advertise.string) ); M_DrawMasterServerReminder(); From 797a776ca4615880d82f5788cfc1adebcc3a59b5 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 20:09:40 -0400 Subject: [PATCH 02/14] Server Options "Advertising..." Rewording "Advertising..." -> "Broadcast..."; "Advertise" -> "Make Public" --- src/menus/options-server-1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index a6640a6e6..3e9a54356 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -14,7 +14,7 @@ menuitem_t OPTIONS_Server[] = { - {IT_HEADER, "Advertising...", NULL, + {IT_HEADER, "Broadcast...", NULL, NULL, {NULL}, 0, 0}, {IT_STRING | IT_CVAR | IT_CV_STRING, "Server Name", "Name of your server.", @@ -23,7 +23,7 @@ menuitem_t OPTIONS_Server[] = {IT_STRING | IT_CVAR | IT_CV_STRING, "Server Contact", "How you should be contacted for Master Server moderation.", NULL, {.cvar = &cv_server_contact}, 0, 0}, - {IT_STRING | IT_CVAR, "Advertise", "Display your server in the Browser for other players to join.", + {IT_STRING | IT_CVAR, "Make Public", "Display your server in the Browser for other players to join.", NULL, {.cvar = &cv_advertise}, 0, 0}, From 079d00ab15a89ddcc6d47d02bab30a1d1a3b909b Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 20:10:40 -0400 Subject: [PATCH 03/14] Voice Chat menu for normies Changed a bit of wording around to stop in-dev confusion, closer to Discord for player facing variables. Didn't change any of the actual true variable names at all. --- src/menus/options-voice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/menus/options-voice.cpp b/src/menus/options-voice.cpp index 7f3a8ba00..c7e1c4926 100644 --- a/src/menus/options-voice.cpp +++ b/src/menus/options-voice.cpp @@ -16,22 +16,22 @@ menuitem_t OPTIONS_Voice[] = { - {IT_STRING | IT_CVAR, "Voice Chat", "Turn on or off all voice chat for yourself.", + {IT_STRING | IT_CVAR, "All Voice Chat", "Choose to opt-in to voice chat at all, for yourself.", NULL, {.cvar = &cv_voice_chat}, 0, 0}, - {IT_STRING | IT_CVAR, "Voice Mode", "When to transmit your own voice.", + {IT_STRING | IT_CVAR, "Input Mode", "When to transmit your own voice.", NULL, {.cvar = &cv_voice_mode}, 0, 0}, {IT_STRING | IT_CVAR, "Input Amplifier", "Amplify your voice, in decibels. Negative values are quieter.", NULL, {.cvar = &cv_voice_inputamp}, 0, 0}, - {IT_STRING | IT_CVAR, "Activation Threshold", "Voice higher than this threshold will transmit, in decibels.", + {IT_STRING | IT_CVAR, "Input Sensitivity", "Voice higher than this threshold will transmit, in decibels.", NULL, {.cvar = &cv_voice_activationthreshold}, 0, 0}, - {IT_STRING | IT_CVAR, "Self Voice Mute", "Whether your voice is transmitted or not.", + {IT_STRING | IT_CVAR, "Mute Self", "Whether your voice is transmitted or not.", NULL, {.cvar = &cv_voice_selfmute}, 0, 0}, - {IT_STRING | IT_CVAR, "Voice Loopback", "Play your own recording voice back.", + {IT_STRING | IT_CVAR, "Voice Loopback", "Play your own voice back simultaneously.", NULL, {.cvar = &cv_voice_loopback}, 0, 0}, {IT_SPACE | IT_NOTHING, NULL, NULL, @@ -40,7 +40,7 @@ menuitem_t OPTIONS_Voice[] = {IT_HEADER, "Server Voice Options...", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "Server Voice Mute", "All voice chat will be disabled on your server.", + {IT_STRING | IT_CVAR, "No Server Voice Chat", "All voice chat will be disabled on your server.", NULL, {.cvar = &cv_voice_servermute}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", From 62e19778a0e1bea24d14c9fa16f9fab2585a4b1c Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 21:12:26 -0400 Subject: [PATCH 04/14] Renamed "All Voice Chat" to "Undeafen & Unmute" Even less confusion, All Voice Chat -> Undeafen & Unmute, moved Self-Mute to the top right above it. --- src/menus/options-voice.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/menus/options-voice.cpp b/src/menus/options-voice.cpp index c7e1c4926..4cc19c6b7 100644 --- a/src/menus/options-voice.cpp +++ b/src/menus/options-voice.cpp @@ -16,7 +16,10 @@ menuitem_t OPTIONS_Voice[] = { - {IT_STRING | IT_CVAR, "All Voice Chat", "Choose to opt-in to voice chat at all, for yourself.", + {IT_STRING | IT_CVAR, "Mute Self", "Whether your voice is transmitted or not.", + NULL, {.cvar = &cv_voice_selfmute}, 0, 0}, + + {IT_STRING | IT_CVAR, "Undeafen & Unmute", "Choose to opt-in to voice chat at all, for yourself.", NULL, {.cvar = &cv_voice_chat}, 0, 0}, {IT_STRING | IT_CVAR, "Input Mode", "When to transmit your own voice.", @@ -28,9 +31,6 @@ menuitem_t OPTIONS_Voice[] = {IT_STRING | IT_CVAR, "Input Sensitivity", "Voice higher than this threshold will transmit, in decibels.", NULL, {.cvar = &cv_voice_activationthreshold}, 0, 0}, - {IT_STRING | IT_CVAR, "Mute Self", "Whether your voice is transmitted or not.", - NULL, {.cvar = &cv_voice_selfmute}, 0, 0}, - {IT_STRING | IT_CVAR, "Voice Loopback", "Play your own voice back simultaneously.", NULL, {.cvar = &cv_voice_loopback}, 0, 0}, From aa0667bac3f511c89890e261e43d7980e8a2fa3b Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 21:52:42 -0400 Subject: [PATCH 05/14] Put Server VC options in Server options Made a copy of Server VC Options and put it in the Server Options menu --- src/menus/options-server-1.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index 3e9a54356..b105f6a23 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -10,6 +10,7 @@ /// \brief Server Options #include "../k_menu.h" +#include "../s_sound.h" menuitem_t OPTIONS_Server[] = { @@ -72,20 +73,27 @@ menuitem_t OPTIONS_Server[] = NULL, {.cvar = &cv_pause}, 0, 0}, - {IT_HEADER, "Chat...", NULL, + {IT_HEADER, "Text Chat...", NULL, NULL, {NULL}, 0, 0}, {IT_STRING | IT_CVAR, "Mute Chat", "Prevent everyone but admins from sending chat messages.", NULL, {.cvar = &cv_mute}, 0, 0}, - {IT_STRING | IT_CVAR, "Mute Voice Chat", "Prevent everyone from sending voice chat.", - NULL, {.cvar = &cv_voice_servermute}, 0, 0}, - {IT_STRING | IT_CVAR, "Chat Spam Protection", "Prevent too many messages from a single player.", NULL, {.cvar = &cv_chatspamprotection}, 0, 0}, {IT_STRING | IT_CVAR, "Rounds Needed To Chat", "How many rounds players must complete before they can chat. Good vs. ban evaders.", NULL, {.cvar = &cv_gamestochat}, 0, 0}, + + + {IT_HEADER, "Voice Chat...", NULL, + NULL, {NULL}, 0, 0}, + + {IT_STRING | IT_CVAR, "No Server Voice Chat", "All voice chat will be disabled on your server.", + NULL, {.cvar = &cv_voice_servermute}, 0, 0}, + + {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", + NULL, {.cvar = &cv_voice_proximity}, 0, 0}, {IT_SPACE | IT_DYBIGSPACE, NULL, NULL, NULL, {NULL}, 0, 0}, From 2c98eefa8d45aab2795f85b460d585bdfed58011 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 22:02:07 -0400 Subject: [PATCH 06/14] Another bit of renaming, and now is in mirrors into Server Options Flipped the On/Off switch on Server Voice Chat & Deafen, put the server VC options in Server Options too --- src/cvars.cpp | 4 ++-- src/menus/options-server-1.c | 2 +- src/menus/options-voice.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cvars.cpp b/src/cvars.cpp index 9bccb47d2..3c2376424 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -1371,7 +1371,7 @@ consvar_t cv_consolechat = Player("chatmode", "Yes").values({{0, "Yes"}, {2, "No // When off, inbound voice packets are ignored void VoiceChat_OnChange(void); -consvar_t cv_voice_chat = Player("voice_chat", "Off") +consvar_t cv_voice_chat = Player("voice_chat", "On") .on_off() .onchange(VoiceChat_OnChange) .description("Whether voice chat is played or not. Shown as self-deafen to others."); @@ -1434,7 +1434,7 @@ consvar_t cv_voice_concurrentattenuation_max = NetVar("voice_concurrentattenuati void Mute_OnChange(void); void VoiceMute_OnChange(void); consvar_t cv_mute = UnsavedNetVar("mute", "Off").on_off().onchange(Mute_OnChange); -consvar_t cv_voice_servermute = NetVar("voice_servermute", "On") +consvar_t cv_voice_servermute = NetVar("voice_servermute", "Off") .on_off() .onchange(VoiceMute_OnChange) .description("If On, the server will not broadcast voice chat to clients"); diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index b105f6a23..9d42fcae0 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -89,7 +89,7 @@ menuitem_t OPTIONS_Server[] = {IT_HEADER, "Voice Chat...", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "No Server Voice Chat", "All voice chat will be disabled on your server.", + {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be disabled on your server.", NULL, {.cvar = &cv_voice_servermute}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", diff --git a/src/menus/options-voice.cpp b/src/menus/options-voice.cpp index 4cc19c6b7..7929c020d 100644 --- a/src/menus/options-voice.cpp +++ b/src/menus/options-voice.cpp @@ -19,7 +19,7 @@ menuitem_t OPTIONS_Voice[] = {IT_STRING | IT_CVAR, "Mute Self", "Whether your voice is transmitted or not.", NULL, {.cvar = &cv_voice_selfmute}, 0, 0}, - {IT_STRING | IT_CVAR, "Undeafen & Unmute", "Choose to opt-in to voice chat at all, for yourself.", + {IT_STRING | IT_CVAR, "Deafen Self", "Choose to opt-in to voice chat at all, for yourself.", NULL, {.cvar = &cv_voice_chat}, 0, 0}, {IT_STRING | IT_CVAR, "Input Mode", "When to transmit your own voice.", @@ -40,7 +40,7 @@ menuitem_t OPTIONS_Voice[] = {IT_HEADER, "Server Voice Options...", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "No Server Voice Chat", "All voice chat will be disabled on your server.", + {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be disabled on your server.", NULL, {.cvar = &cv_voice_servermute}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", From 51ac6c250b4538f42f46ada04cb06c1152b0f679 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 22:37:51 -0400 Subject: [PATCH 07/14] "Undeafen" (still cv_voice_chat for now), flipped all bools Flipped all bools on Undeafen since it's worded different --- src/d_clisrv.c | 6 +++--- src/menus/options-sound.cpp | 2 +- src/s_sound.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 4581f164c..0f5c8f748 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -5275,7 +5275,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver) { continue; } - if (cv_voice_chat.value != 0 && playernum != g_localplayers[0]) + if (cv_voice_chat.value != 1 && playernum != g_localplayers[0]) { S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), false); } @@ -5289,7 +5289,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver) return; } - if (cv_voice_chat.value != 0 && playernum != g_localplayers[0]) + if (cv_voice_chat.value != 1 && playernum != g_localplayers[0]) { S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), terminal); } @@ -7474,7 +7474,7 @@ void NetVoiceUpdate(void) continue; } - if (cv_voice_chat.value == 0) + if (cv_voice_chat.value == 1) { g_local_voice_buffer_len = 0; continue; diff --git a/src/menus/options-sound.cpp b/src/menus/options-sound.cpp index e77d7a6c0..22a81ff6b 100644 --- a/src/menus/options-sound.cpp +++ b/src/menus/options-sound.cpp @@ -157,7 +157,7 @@ std::array sliders{{ { if (toggle) { - CV_AddValue(&cv_voice_chat, 1); + CV_AddValue(&cv_voice_chat, 0); } return !S_VoiceDisabled(); diff --git a/src/s_sound.c b/src/s_sound.c index 2592410f5..e2b87d0a4 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2879,7 +2879,7 @@ void S_QueueVoiceFrameFromPlayer(INT32 playernum, void *data, UINT32 len, boolea { return; } - if (cv_voice_chat.value != 0) + if (cv_voice_chat.value != 1) { I_QueueVoiceFrameFromPlayer(playernum, data, len, terminal); } From 283e01030132ccbc728eb002d0dfcf52ad7b4e3b Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 22:38:42 -0400 Subject: [PATCH 08/14] "Server Voice Chat" (still named cv_voice_servermute for now) Flipped all bools (HOPEFULLY CORRECTLY) --- src/cvars.cpp | 2 +- src/d_clisrv.c | 2 +- src/d_netcmd.c | 4 ++-- src/k_hud.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cvars.cpp b/src/cvars.cpp index 3c2376424..25ac4e78b 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -1437,7 +1437,7 @@ consvar_t cv_mute = UnsavedNetVar("mute", "Off").on_off().onchange(Mute_OnChange consvar_t cv_voice_servermute = NetVar("voice_servermute", "Off") .on_off() .onchange(VoiceMute_OnChange) - .description("If On, the server will not broadcast voice chat to clients"); + .description("If Off, the server will not broadcast voice chat to clients"); // diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 0f5c8f748..d60250868 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1088,7 +1088,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) netbuffer->u.serverinfo.kartvars = (UINT8) ( (gamespeed & SV_SPEEDMASK) | (dedicated ? SV_DEDICATED : 0) | - (!cv_voice_servermute.value ? SV_VOICEENABLED : 0) + (!cv_voice_servermute.value ? SV_VOICEENABLED : 1) ); D_ParseCarets(netbuffer->u.serverinfo.servername, cv_servername.string, MAXSERVERNAME); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index d259c8f13..f6d1b9aa6 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -7110,9 +7110,9 @@ void VoiceMute_OnChange(void) return; // avoid having this notification put in our console / log when we boot the server. if (cv_voice_servermute.value) - HU_AddChatText(M_GetText("\x82*Voice chat has been muted."), false); - else HU_AddChatText(M_GetText("\x82*Voice chat is no longer muted."), false); + else + HU_AddChatText(M_GetText("\x82*Voice chat has been muted."), false); } /** Hack to clear all changed flags after game start. diff --git a/src/k_hud.cpp b/src/k_hud.cpp index c0ffc6af1..733e0b58f 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -8081,7 +8081,7 @@ void K_drawKartHUD(void) } } - if (netgame && cv_voice_servermute.value == 0) + if (netgame && cv_voice_servermute.value == 1) { if (players[consoleplayer].pflags2 & (PF2_SELFMUTE | PF2_SERVERMUTE | PF2_SELFDEAFEN | PF2_SERVERDEAFEN)) { From 29d1dcef2d317779a2e8f184898ecc5682544fac Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 22:54:43 -0400 Subject: [PATCH 09/14] "Deafen" and "Server Voice Chat" now have new variables cv_voice_chat -> cv_voice_selfdeafen & cv_voice_servermute -> cv_voice_allowservervoice --- src/cvars.cpp | 8 ++++---- src/d_clisrv.c | 12 ++++++------ src/d_netcmd.c | 8 ++++---- src/d_netcmd.h | 2 +- src/k_hud.cpp | 4 ++-- src/menus/options-server-1.c | 2 +- src/menus/options-sound.cpp | 4 ++-- src/menus/options-voice.cpp | 4 ++-- src/s_sound.c | 4 ++-- src/s_sound.h | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/cvars.cpp b/src/cvars.cpp index 25ac4e78b..e5236b497 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -1371,7 +1371,7 @@ consvar_t cv_consolechat = Player("chatmode", "Yes").values({{0, "Yes"}, {2, "No // When off, inbound voice packets are ignored void VoiceChat_OnChange(void); -consvar_t cv_voice_chat = Player("voice_chat", "On") +consvar_t cv_voice_selfdeafen = Player("voice_chat", "On") .on_off() .onchange(VoiceChat_OnChange) .description("Whether voice chat is played or not. Shown as self-deafen to others."); @@ -1432,11 +1432,11 @@ consvar_t cv_voice_concurrentattenuation_max = NetVar("voice_concurrentattenuati .description("Maximum concurrent speakers at which full global attenuation is applied"); void Mute_OnChange(void); -void VoiceMute_OnChange(void); +void AllowServerVC_OnChange(void); consvar_t cv_mute = UnsavedNetVar("mute", "Off").on_off().onchange(Mute_OnChange); -consvar_t cv_voice_servermute = NetVar("voice_servermute", "Off") +consvar_t cv_voice_allowservervoice = NetVar("voice_allowservervoice", "Off") .on_off() - .onchange(VoiceMute_OnChange) + .onchange(AllowServerVC_OnChange) .description("If Off, the server will not broadcast voice chat to clients"); diff --git a/src/d_clisrv.c b/src/d_clisrv.c index d60250868..8d0b8196f 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1088,7 +1088,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) netbuffer->u.serverinfo.kartvars = (UINT8) ( (gamespeed & SV_SPEEDMASK) | (dedicated ? SV_DEDICATED : 0) | - (!cv_voice_servermute.value ? SV_VOICEENABLED : 1) + (!cv_voice_allowservervoice.value ? SV_VOICEENABLED : 1) ); D_ParseCarets(netbuffer->u.serverinfo.servername, cv_servername.string, MAXSERVERNAME); @@ -5275,7 +5275,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver) { continue; } - if (cv_voice_chat.value != 1 && playernum != g_localplayers[0]) + if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0]) { S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), false); } @@ -5289,7 +5289,7 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver) return; } - if (cv_voice_chat.value != 1 && playernum != g_localplayers[0]) + if (cv_voice_selfdeafen.value != 1 && playernum != g_localplayers[0]) { S_QueueVoiceFrameFromPlayer(playernum, (void*)decoded_out, decoded_samples * sizeof(float), terminal); } @@ -5306,9 +5306,9 @@ static void PT_HandleVoiceServer(SINT8 node) int playernum = -1; player_t *player; - if (cv_voice_servermute.value != 0) + if (cv_voice_allowservervoice.value != 0) { - // Don't even relay voice packets if voice_servermute is on + // Don't even relay voice packets if voice_allowservervoice is on return; } @@ -7474,7 +7474,7 @@ void NetVoiceUpdate(void) continue; } - if (cv_voice_chat.value == 1) + if (cv_voice_selfdeafen.value == 1) { g_local_voice_buffer_len = 0; continue; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index f6d1b9aa6..c372c62a9 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1224,7 +1224,7 @@ void WeaponPref_Send(UINT8 ssplayer) if (cv_voice_selfmute.value) prefs |= WP_SELFMUTE; - if (!cv_voice_chat.value) + if (!cv_voice_selfdeafen.value) prefs |= WP_SELFDEAFEN; } @@ -7103,13 +7103,13 @@ void Mute_OnChange(void) HU_AddChatText(M_GetText("\x82*Chat is no longer muted."), false); } -void VoiceMute_OnChange(void); -void VoiceMute_OnChange(void) +void AllowServerVC_OnChange(void); +void AllowServerVC_OnChange(void) { if (leveltime <= 1) return; // avoid having this notification put in our console / log when we boot the server. - if (cv_voice_servermute.value) + if (cv_voice_allowservervoice.value) HU_AddChatText(M_GetText("\x82*Voice chat is no longer muted."), false); else HU_AddChatText(M_GetText("\x82*Voice chat has been muted."), false); diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 3aa2af849..7ac959ce2 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -62,7 +62,7 @@ extern consvar_t cv_netstat; extern consvar_t cv_countdowntime; extern consvar_t cv_mute; -extern consvar_t cv_voice_servermute; +extern consvar_t cv_voice_allowservervoice; extern consvar_t cv_pause; extern consvar_t cv_restrictskinchange, cv_allowteamchange, cv_maxplayers, cv_shuffleloser; diff --git a/src/k_hud.cpp b/src/k_hud.cpp index 733e0b58f..be03cf02a 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -2967,7 +2967,7 @@ void PositionFacesInfo::draw_1p() } // Voice speaking indicator - if (netgame && !players[rankplayer[i]].bot && cv_voice_servermute.value == 0) + if (netgame && !players[rankplayer[i]].bot && cv_voice_allowservervoice.value == 0) { patch_t *voxmic; if (S_IsPlayerVoiceActive(rankplayer[i])) @@ -8081,7 +8081,7 @@ void K_drawKartHUD(void) } } - if (netgame && cv_voice_servermute.value == 1) + if (netgame && cv_voice_allowservervoice.value == 1) { if (players[consoleplayer].pflags2 & (PF2_SELFMUTE | PF2_SERVERMUTE | PF2_SELFDEAFEN | PF2_SERVERDEAFEN)) { diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index 9d42fcae0..a2b5b1e18 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -90,7 +90,7 @@ menuitem_t OPTIONS_Server[] = NULL, {NULL}, 0, 0}, {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be disabled on your server.", - NULL, {.cvar = &cv_voice_servermute}, 0, 0}, + NULL, {.cvar = &cv_voice_allowservervoice}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", NULL, {.cvar = &cv_voice_proximity}, 0, 0}, diff --git a/src/menus/options-sound.cpp b/src/menus/options-sound.cpp index 22a81ff6b..3d1c29d22 100644 --- a/src/menus/options-sound.cpp +++ b/src/menus/options-sound.cpp @@ -121,7 +121,7 @@ std::array sliders{{ n = !n; CV_SetValue(&cv_gamedigimusic, n); CV_SetValue(&cv_gamesounds, n); - CV_SetValue(&cv_voice_chat, n); + CV_SetValue(&cv_voice_selfdeafen, n); } return n; @@ -157,7 +157,7 @@ std::array sliders{{ { if (toggle) { - CV_AddValue(&cv_voice_chat, 0); + CV_AddValue(&cv_voice_selfdeafen, 0); } return !S_VoiceDisabled(); diff --git a/src/menus/options-voice.cpp b/src/menus/options-voice.cpp index 7929c020d..2e0624483 100644 --- a/src/menus/options-voice.cpp +++ b/src/menus/options-voice.cpp @@ -20,7 +20,7 @@ menuitem_t OPTIONS_Voice[] = NULL, {.cvar = &cv_voice_selfmute}, 0, 0}, {IT_STRING | IT_CVAR, "Deafen Self", "Choose to opt-in to voice chat at all, for yourself.", - NULL, {.cvar = &cv_voice_chat}, 0, 0}, + NULL, {.cvar = &cv_voice_selfdeafen}, 0, 0}, {IT_STRING | IT_CVAR, "Input Mode", "When to transmit your own voice.", NULL, {.cvar = &cv_voice_mode}, 0, 0}, @@ -41,7 +41,7 @@ menuitem_t OPTIONS_Voice[] = NULL, {NULL}, 0, 0}, {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be disabled on your server.", - NULL, {.cvar = &cv_voice_servermute}, 0, 0}, + NULL, {.cvar = &cv_voice_allowservervoice}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", NULL, {.cvar = &cv_voice_proximity}, 0, 0}, diff --git a/src/s_sound.c b/src/s_sound.c index e2b87d0a4..f55127567 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2832,7 +2832,7 @@ void VoiceChat_OnChange(void) if (M_CheckParm("-novoice") || M_CheckParm("-noaudio")) return; - g_voice_disabled = !cv_voice_chat.value; + g_voice_disabled = !cv_voice_selfdeafen.value; weaponPrefChange(0); } @@ -2879,7 +2879,7 @@ void S_QueueVoiceFrameFromPlayer(INT32 playernum, void *data, UINT32 len, boolea { return; } - if (cv_voice_chat.value != 1) + if (cv_voice_selfdeafen.value != 1) { I_QueueVoiceFrameFromPlayer(playernum, data, len, terminal); } diff --git a/src/s_sound.h b/src/s_sound.h index 9b9143bef..72a0b3387 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -48,7 +48,7 @@ extern consvar_t cv_gamesounds; extern consvar_t cv_bgaudio; extern consvar_t cv_streamersafemusic; -extern consvar_t cv_voice_chat; +extern consvar_t cv_voice_selfdeafen; extern consvar_t cv_voice_mode; extern consvar_t cv_voice_selfmute; extern consvar_t cv_voice_loopback; From 1881208d5f7f10998ba8b8ded0c7b8dc9915d921 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 23:02:25 -0400 Subject: [PATCH 10/14] Caught 2 more variables that needed renaming VoiceChat_OnChange -> VoiceSelfDeafen_OnChange, & voice_chat -> voice_selfdeafen --- src/cvars.cpp | 6 +++--- src/s_sound.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cvars.cpp b/src/cvars.cpp index e5236b497..b96d3dccc 100644 --- a/src/cvars.cpp +++ b/src/cvars.cpp @@ -1370,10 +1370,10 @@ consvar_t cv_chatwidth = Player("chatwidth", "150").min_max(64, 150); consvar_t cv_consolechat = Player("chatmode", "Yes").values({{0, "Yes"}, {2, "No"}}); // When off, inbound voice packets are ignored -void VoiceChat_OnChange(void); -consvar_t cv_voice_selfdeafen = Player("voice_chat", "On") +void VoiceSelfDeafen_OnChange(void); +consvar_t cv_voice_selfdeafen = Player("voice_selfdeafen", "On") .on_off() - .onchange(VoiceChat_OnChange) + .onchange(VoiceSelfDeafen_OnChange) .description("Whether voice chat is played or not. Shown as self-deafen to others."); // When on, local player won't transmit voice diff --git a/src/s_sound.c b/src/s_sound.c index f55127567..90b6a5228 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2825,9 +2825,9 @@ void GameDigiMusic_OnChange(void) } } -void VoiceChat_OnChange(void); +void VoiceSelfDeafen_OnChange(void); void weaponPrefChange(INT32 ssplayer); -void VoiceChat_OnChange(void) +void VoiceSelfDeafen_OnChange(void) { if (M_CheckParm("-novoice") || M_CheckParm("-noaudio")) return; From 3e194b1a28bccdc71f4501588871dd4835c311d1 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 23:12:50 -0400 Subject: [PATCH 11/14] Missed a reversal I sure hope there's not one of these for allowservervoice too... --- src/s_sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_sound.c b/src/s_sound.c index 90b6a5228..0fab32cd3 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -2832,7 +2832,7 @@ void VoiceSelfDeafen_OnChange(void) if (M_CheckParm("-novoice") || M_CheckParm("-noaudio")) return; - g_voice_disabled = !cv_voice_selfdeafen.value; + g_voice_disabled = cv_voice_selfdeafen.value; weaponPrefChange(0); } From d3e4f9182412062b6a4f554f796699b66e9697ef Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 23:19:03 -0400 Subject: [PATCH 12/14] More reversals to fix More reverals fixed, forgot wording on blurb --- src/d_clisrv.c | 4 ++-- src/d_netcmd.c | 2 +- src/menus/options-server-1.c | 2 +- src/menus/options-voice.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 8d0b8196f..dc4cb705f 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1088,7 +1088,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) netbuffer->u.serverinfo.kartvars = (UINT8) ( (gamespeed & SV_SPEEDMASK) | (dedicated ? SV_DEDICATED : 0) | - (!cv_voice_allowservervoice.value ? SV_VOICEENABLED : 1) + (!cv_voice_allowservervoice.value ? SV_VOICEENABLED : 0) ); D_ParseCarets(netbuffer->u.serverinfo.servername, cv_servername.string, MAXSERVERNAME); @@ -5308,7 +5308,7 @@ static void PT_HandleVoiceServer(SINT8 node) if (cv_voice_allowservervoice.value != 0) { - // Don't even relay voice packets if voice_allowservervoice is on + // Don't even relay voice packets if voice_allowservervoice is off return; } diff --git a/src/d_netcmd.c b/src/d_netcmd.c index c372c62a9..13ddfca17 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1224,7 +1224,7 @@ void WeaponPref_Send(UINT8 ssplayer) if (cv_voice_selfmute.value) prefs |= WP_SELFMUTE; - if (!cv_voice_selfdeafen.value) + if (cv_voice_selfdeafen.value) prefs |= WP_SELFDEAFEN; } diff --git a/src/menus/options-server-1.c b/src/menus/options-server-1.c index a2b5b1e18..ac049dab9 100644 --- a/src/menus/options-server-1.c +++ b/src/menus/options-server-1.c @@ -89,7 +89,7 @@ menuitem_t OPTIONS_Server[] = {IT_HEADER, "Voice Chat...", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be disabled on your server.", + {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be enabled on your server.", NULL, {.cvar = &cv_voice_allowservervoice}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", diff --git a/src/menus/options-voice.cpp b/src/menus/options-voice.cpp index 2e0624483..3e7d74d8d 100644 --- a/src/menus/options-voice.cpp +++ b/src/menus/options-voice.cpp @@ -40,7 +40,7 @@ menuitem_t OPTIONS_Voice[] = {IT_HEADER, "Server Voice Options...", NULL, NULL, {NULL}, 0, 0}, - {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be disabled on your server.", + {IT_STRING | IT_CVAR, "Server Voice Chat", "All voice chat will be enabled on your server.", NULL, {.cvar = &cv_voice_allowservervoice}, 0, 0}, {IT_STRING | IT_CVAR, "Proximity Effects", "Player voices will be adjusted relative to you.", From 0ad68828836533cca953e642dd23e592b40ba941 Mon Sep 17 00:00:00 2001 From: VelocitOni Date: Thu, 24 Jul 2025 23:26:42 -0400 Subject: [PATCH 13/14] One more reversal in HUD 0 to 1 --- src/k_hud.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_hud.cpp b/src/k_hud.cpp index be03cf02a..683117cab 100644 --- a/src/k_hud.cpp +++ b/src/k_hud.cpp @@ -2967,7 +2967,7 @@ void PositionFacesInfo::draw_1p() } // Voice speaking indicator - if (netgame && !players[rankplayer[i]].bot && cv_voice_allowservervoice.value == 0) + if (netgame && !players[rankplayer[i]].bot && cv_voice_allowservervoice.value == 1) { patch_t *voxmic; if (S_IsPlayerVoiceActive(rankplayer[i])) From 4fd5f1f98668f22e55fdf9c435dad0edc30fe65d Mon Sep 17 00:00:00 2001 From: Eidolon Date: Thu, 24 Jul 2025 22:59:19 -0500 Subject: [PATCH 14/14] Fix remaining issues with voice cvar logic flip --- src/d_clisrv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index dc4cb705f..9b1d9fb31 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -1088,7 +1088,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime) netbuffer->u.serverinfo.kartvars = (UINT8) ( (gamespeed & SV_SPEEDMASK) | (dedicated ? SV_DEDICATED : 0) | - (!cv_voice_allowservervoice.value ? SV_VOICEENABLED : 0) + (cv_voice_allowservervoice.value ? SV_VOICEENABLED : 0) ); D_ParseCarets(netbuffer->u.serverinfo.servername, cv_servername.string, MAXSERVERNAME); @@ -5306,7 +5306,7 @@ static void PT_HandleVoiceServer(SINT8 node) int playernum = -1; player_t *player; - if (cv_voice_allowservervoice.value != 0) + if (!cv_voice_allowservervoice.value) { // Don't even relay voice packets if voice_allowservervoice is off return;