Skip to content

Commit

Permalink
UI: Update send targets to ingame voice chat menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kai-li-wop committed Apr 8, 2022
1 parent 0b7ee02 commit e6ecb4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/ui/ui_voicechat.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ typedef struct {

static voiceChatMenuInfo_t voiceChatMenuInfo;

static const char *sendTarget_names[] = {"all", "team", 0};
static const char *sendTarget_items[] = {"all", "none", "attacker", "crosshair", "spatial", NULL};

static void UI_VoiceChatMenu_SetClientNames(void) {
int i, j;
Expand Down Expand Up @@ -199,7 +199,7 @@ static void UI_VoiceChatMenu_sendTargetEvent(void *ptr, int event) {
if (val < 0 || val >= 2) // hardcoded array size :/
return;

trap_Cvar_Set("cl_voipSendTarget", sendTarget_names[voiceChatMenuInfo.sendTarget.curvalue]);
trap_Cvar_Set("cl_voipSendTarget", sendTarget_items[voiceChatMenuInfo.sendTarget.curvalue]);
}

static void UI_VoiceChatMenu_InitClients(void) {
Expand Down Expand Up @@ -318,7 +318,7 @@ static void UI_VoiceChatMenu_Init(void) {
voiceChatMenuInfo.sendTarget.generic.callback = UI_VoiceChatMenu_sendTargetEvent;
voiceChatMenuInfo.sendTarget.generic.x = 315;
voiceChatMenuInfo.sendTarget.generic.y = y;
voiceChatMenuInfo.sendTarget.itemnames = sendTarget_names;
voiceChatMenuInfo.sendTarget.itemnames = sendTarget_items;

trap_Cvar_VariableStringBuffer("cl_voipSendTarget", sendTargetValue, sizeof(sendTargetValue));
i = 0;
Expand Down

0 comments on commit e6ecb4c

Please sign in to comment.