Swapped the meaning of cl_chatmode 1 and cl_chatmode 2 for consistency reasons

This commit is contained in:
Anton E. Gavrilov 2000-06-17 23:24:53 +00:00
parent 88389e4076
commit a006a341cb
2 changed files with 8 additions and 8 deletions

View file

@ -186,7 +186,7 @@ Category :
Type : Number Type : Number
Default : 1 Default : 1
Description : Controls when console text will be treated as a chat message 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 Cvar : cl_crossx
Targets : Targets :
@ -1440,7 +1440,7 @@ Category :
Type : integer Type : integer
Default : 8 for Win9x, 0 for WinNT Default : 8 for Win9x, 0 for WinNT
Description : Numbers of milliseconds to try to Sleep() every frame. 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 Cvar : team
Targets : Targets :

View file

@ -282,12 +282,12 @@ void Key_Console (int key)
goto no_lf; goto no_lf;
else if (key_lines[edit_line][1] == '\\' || key_lines[edit_line][1] == '/') else if (key_lines[edit_line][1] == '\\' || key_lines[edit_line][1] == '/')
Cbuf_AddText (key_lines[edit_line]+2); // skip the ]/ 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 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 if (cls.state < ca_connected) // can happen if cl_chatmode is 1
goto no_lf; // drop the whole line goto no_lf; // the text goes to /dev/null :)
// convert to a chat message // convert to a chat message
Cbuf_AddText ("say "); Cbuf_AddText ("say ");
@ -756,9 +756,9 @@ void Key_Init (void)
Cmd_AddCommand ("unbind",Key_Unbind_f); Cmd_AddCommand ("unbind",Key_Unbind_f);
Cmd_AddCommand ("unbindall",Key_Unbindall_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" "Controls when console text will be treated as a chat message"
"0 - never, 1 - smart, 2 - always"); "0 - never, 1 - always, 2 - smart");
} }
/* /*