From a006a341cb868bb2f07ac94148c98e2e4247f238 Mon Sep 17 00:00:00 2001 From: "Anton E. Gavrilov" Date: Sat, 17 Jun 2000 23:24:53 +0000 Subject: [PATCH] Swapped the meaning of cl_chatmode 1 and cl_chatmode 2 for consistency reasons --- doc/cvarlist.txt | 4 ++-- source/keys.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/cvarlist.txt b/doc/cvarlist.txt index 2f74b65..1024112 100644 --- a/doc/cvarlist.txt +++ b/doc/cvarlist.txt @@ -186,7 +186,7 @@ Category : Type : Number Default : 1 Description : Controls when console text will be treated as a chat message - : 0-never, 1-smart, 2-always + : 0-never, 1-always, 2-smart Cvar : cl_crossx Targets : @@ -1440,7 +1440,7 @@ Category : Type : integer Default : 8 for Win9x, 0 for WinNT Description : Numbers of milliseconds to try to Sleep() every frame. - : Needed when running the server on localhost in Win9x. + : Needed when running the server on localhost in Win9x. Cvar : team Targets : diff --git a/source/keys.c b/source/keys.c index 7a174bd..06b83c2 100644 --- a/source/keys.c +++ b/source/keys.c @@ -282,12 +282,12 @@ void Key_Console (int key) goto no_lf; else if (key_lines[edit_line][1] == '\\' || key_lines[edit_line][1] == '/') Cbuf_AddText (key_lines[edit_line]+2); // skip the ]/ - else if (cl_chatmode->value != 2 && CheckForCommand()) + else if (cl_chatmode->value != 1 && CheckForCommand()) Cbuf_AddText (key_lines[edit_line]+1); // valid command - else if ((cls.state >= ca_connected && cl_chatmode->value == 1) || cl_chatmode->value == 2) + else if ((cls.state >= ca_connected && cl_chatmode->value == 2) || cl_chatmode->value == 1) { - if (cls.state < ca_connected) // can happen if cl_constyle == 2 - goto no_lf; // drop the whole line + if (cls.state < ca_connected) // can happen if cl_chatmode is 1 + goto no_lf; // the text goes to /dev/null :) // convert to a chat message Cbuf_AddText ("say "); @@ -756,9 +756,9 @@ void Key_Init (void) Cmd_AddCommand ("unbind",Key_Unbind_f); Cmd_AddCommand ("unbindall",Key_Unbindall_f); - cl_chatmode = Cvar_Get ("cl_chatmode", "1", 0, + cl_chatmode = Cvar_Get ("cl_chatmode", "2", 0, "Controls when console text will be treated as a chat message" - "0 - never, 1 - smart, 2 - always"); + "0 - never, 1 - always, 2 - smart"); } /*