mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 18:07:09 +01: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:
parent
f1a4d66d27
commit
46fd27eb14
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user