mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
console: remove prepending backslashes
This is a leftover from Quake, where the console and chat were in fact same entity. Because Xash splits it, there is no need in prepending backslashes to separate commands from chat messages
This commit is contained in:
@@ -1812,16 +1812,6 @@ void Key_Console( int key )
|
||||
// enter finishes the line
|
||||
if( key == K_ENTER || key == K_KP_ENTER )
|
||||
{
|
||||
// if not in the game explicitly prepent a slash if needed
|
||||
if( cls.state != ca_active && con.input.buffer[0] != '\\' && con.input.buffer[0] != '/' )
|
||||
{
|
||||
char temp[MAX_SYSPATH];
|
||||
|
||||
Q_strncpy( temp, con.input.buffer, sizeof( temp ));
|
||||
Q_sprintf( con.input.buffer, "\\%s", temp );
|
||||
con.input.cursor++;
|
||||
}
|
||||
|
||||
// backslash text are commands, else chat
|
||||
if( con.input.buffer[0] == '\\' || con.input.buffer[0] == '/' )
|
||||
Cbuf_AddText( con.input.buffer + 1 ); // skip backslash
|
||||
|
||||
Reference in New Issue
Block a user