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.
This commit is contained in:
Joseph Carter 2000-03-26 11:49:29 +00:00
parent 902bb5304a
commit c57298ed75
4 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -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;

View file

@ -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 ());

View file

@ -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 ());