Merge 4281 update

This commit is contained in:
Alibek Omarov
2018-10-28 00:39:29 +03:00
78 changed files with 1010 additions and 847 deletions
+13 -11
View File
@@ -591,11 +591,11 @@ void Cmd_TokenizeString( char *text )
if( !*text )
return;
if( cmd_argc == 1 )
cmd_args = text;
host.com_ignorebracket = true;
host.com_ignorebracket = true;
text = COM_ParseFile( text, cmd_token );
host.com_ignorebracket = false;
@@ -621,7 +621,7 @@ static int Cmd_AddCommandEx( const char *funcname, const char *cmd_name, xcomman
if( !COM_CheckString( cmd_name ))
{
MsgDev( D_ERROR, "Cmd_AddCommand: NULL name\n" );
Con_Reportf( S_ERROR "Cmd_AddCommand: NULL name\n" );
return 0;
}
@@ -986,19 +986,21 @@ void Cmd_ExecuteString( char *text )
if( host.apply_game_config )
return; // don't send nothing to server: we is a server!
#ifndef XASH_DEDICATED
// forward the command line to the server, so the entity DLL can parse it
if( host.type == HOST_NORMAL )
{
#ifndef XASH_DEDICATED
if( cls.state >= ca_connected )
{
Cmd_ForwardToServer();
}
else
#endif
if( text[0] != '@' && host.type == HOST_NORMAL )
{
// commands with leading '@' are hidden system commands
Con_Printf( S_WARN "Unknown command \"%s\"\n", text );
}
else
#endif // XASH_DEDICATED
if( text[0] != '@' && Cvar_VariableInteger( "host_gameloaded" ))
{
// commands with leading '@' are hidden system commands
Con_Printf( S_WARN "Unknown command \"%s\"\n", text );
}
}
}