Add con_autochat and con_autoclear cvars
This commit is contained in:
1 parent
c12b81a273
commit
dfce71929a
6 files changed
+35
-7
No files matched your search
@@ -613,7 +613,7 @@ void Console_Key (int key) {
|
||||
// enter finishes the line
|
||||
if ( key == K_ENTER || key == K_KP_ENTER ) {
|
||||
// if not in the game explicitly prepend a slash if needed
|
||||
if ( clc.state != CA_ACTIVE &&
|
||||
if ( clc.state != CA_ACTIVE && con_autochat->integer &&
|
||||
g_consoleField.buffer[0] &&
|
||||
g_consoleField.buffer[0] != '\\' &&
|
||||
g_consoleField.buffer[0] != '/' ) {
|
||||
@@ -635,7 +635,10 @@ void Console_Key (int key) {
|
||||
if ( !g_consoleField.buffer[0] ) {
|
||||
return; // empty lines just scroll the console without adding to history
|
||||
} else {
|
||||
Cbuf_AddText ("cmd say ");
|
||||
if ( con_autochat->integer ) {
|
||||
Cbuf_AddText ("cmd say ");
|
||||
}
|
||||
|
||||
Cbuf_AddText( g_consoleField.buffer );
|
||||
Cbuf_AddText ("\n");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user