From c57298ed7584870674848e7d99ff9b7757fc1175 Mon Sep 17 00:00:00 2001 From: Joseph Carter Date: Sun, 26 Mar 2000 11:49:29 +0000 Subject: [PATCH] new cvar, cl_talksound. Defaults to misc/talk.wav. Could probably use a little more error checking and possibly default to misc/talk.wav if the file you give it doesn't exist or something. If someone wants to do that go for it - I'm just adding it to my personal todo list for later so I can get back to GL fullbright stuff. --- common/cl_main.c | 5 +++++ common/client.h | 3 +++ qw_client/cl_parse.c | 2 +- uquake/cl_parse.c | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/cl_main.c b/common/cl_main.c index 774e300..55a601a 100644 --- a/common/cl_main.c +++ b/common/cl_main.c @@ -128,6 +128,8 @@ cvar_t *cl_predict_players2; cvar_t *cl_solid_players; cvar_t *cl_verstring; +cvar_t *cl_talksound; + extern cvar_t *sys_nostdout; cvar_t *localid; @@ -1745,6 +1747,9 @@ void CL_InitCvars() cl_predict_players = Cvar_Get ("cl_predict_players","1",0,"None"); cl_solid_players = Cvar_Get ("cl_solid_players","1",0,"None"); + cl_talksound = Cvar_Get ("cl_talksound", "misc/talk.wav", CVAR_NONE, + "The sound used for talk messages"); + localid = Cvar_Get ("localid","",0,"None"); #ifdef QUAKEWORLD diff --git a/common/client.h b/common/client.h index 05adcca..46b65ee 100644 --- a/common/client.h +++ b/common/client.h @@ -381,6 +381,9 @@ extern cvar_t *cl_hudswap; extern cvar_t *cl_pitchdriftspeed; extern cvar_t *cl_verstring; + +extern cvar_t *cl_talksound; + extern cvar_t *lookspring; extern cvar_t *lookstrafe; extern cvar_t *sensitivity; diff --git a/qw_client/cl_parse.c b/qw_client/cl_parse.c index f5ca2cb..ccacb83 100644 --- a/qw_client/cl_parse.c +++ b/qw_client/cl_parse.c @@ -1109,7 +1109,7 @@ void CL_ParseServerMessage (void) i = MSG_ReadByte (); if (i == PRINT_CHAT) { - S_LocalSound ("misc/talk.wav"); + S_LocalSound (cl_talksound->string); con_ormask = 128; } Con_Printf ("%s", MSG_ReadString ()); diff --git a/uquake/cl_parse.c b/uquake/cl_parse.c index 4a73839..782790d 100644 --- a/uquake/cl_parse.c +++ b/uquake/cl_parse.c @@ -611,7 +611,7 @@ void CL_ParseServerMessage (void) case svc_print: ch = MSG_ReadChar (); if (ch == '\x01') { - S_LocalSound ("misc/talk.wav"); + S_LocalSound (cl_talksound->string); con_ormask = 128; } Con_Printf ("%c%s", ch, MSG_ReadString ());