Don't draw voice indicators on score unless voice is enabled on server

This commit is contained in:
Eidolon 2025-09-17 18:11:30 -05:00
parent ca033d2ce7
commit 21786610d7
3 changed files with 16 additions and 15 deletions

View file

@ -8232,21 +8232,22 @@ void K_drawKartHUD(void)
} }
// TODO better voice chat speaking indicator integration for spectators // TODO better voice chat speaking indicator integration for spectators
{ // Just kidding spectator voice is disabled in-level anyway
char speakingstring[2048]; // {
memset(speakingstring, 0, sizeof(speakingstring)); // char speakingstring[2048];
// memset(speakingstring, 0, sizeof(speakingstring));
for (int i = 0; i < MAXPLAYERS; i++) // for (int i = 0; i < MAXPLAYERS; i++)
{ // {
if (playeringame[i] && players[i].spectator && S_IsPlayerVoiceActive(i)) // if (netgame && cv_voice_allowservervoice.value && playeringame[i] && players[i].spectator && S_IsPlayerVoiceActive(i))
{ // {
strcat(speakingstring, player_names[i]); // strcat(speakingstring, player_names[i]);
strcat(speakingstring, " "); // strcat(speakingstring, " ");
} // }
} // }
V_DrawThinString(0, 0, V_SNAPTOTOP|V_SNAPTOLEFT, speakingstring); // V_DrawThinString(0, 0, V_SNAPTOTOP|V_SNAPTOLEFT, speakingstring);
} // }
// Draw the countdowns after everything else. // Draw the countdowns after everything else.
if (stplyr->lives <= 0 && stplyr->playerstate == PST_DEAD) if (stplyr->lives <= 0 && stplyr->playerstate == PST_DEAD)

View file

@ -1209,7 +1209,7 @@ void Y_VoteDrawer(void)
for (int i = 0; i < MAXPLAYERS; i++) for (int i = 0; i < MAXPLAYERS; i++)
{ {
if (S_IsPlayerVoiceActive(i)) if (netgame && cv_voice_allowservervoice.value && S_IsPlayerVoiceActive(i))
{ {
strcat(speakingstring, player_names[i]); strcat(speakingstring, player_names[i]);
strcat(speakingstring, " "); strcat(speakingstring, " ");

View file

@ -793,7 +793,7 @@ void Y_PlayerStandingsDrawer(y_data_t *standings, INT32 xoffset)
player_names[pnum] player_names[pnum]
); );
if (netgame) if (netgame && cv_voice_allowservervoice.value)
{ {
patch_t *voxpat; patch_t *voxpat;
int voxxoffs = 0; int voxxoffs = 0;