Browse Source

engine: client: eliminate pfnServerCmd limit and, like GoldSrc, send our server command immediately to netchan

pull/2/head
Alibek Omarov 2 years ago
parent
commit
dca637d4bb
  1. 6
      engine/client/cl_game.c

6
engine/client/cl_game.c

@ -1727,14 +1727,12 @@ pfnServerCmd
*/ */
static int GAME_EXPORT pfnServerCmd( const char *szCmdString ) static int GAME_EXPORT pfnServerCmd( const char *szCmdString )
{ {
string buf;
if( !COM_CheckString( szCmdString )) if( !COM_CheckString( szCmdString ))
return 0; return 0;
// just like the client typed "cmd xxxxx" at the console // just like the client typed "cmd xxxxx" at the console
Q_snprintf( buf, sizeof( buf ) - 1, "cmd %s\n", szCmdString ); MSG_BeginClientCmd( &cls.netchan.message, clc_stringcmd );
Cbuf_AddText( buf ); MSG_WriteString( &cls.netchan.message, szCmdString );
return 1; return 1;
} }

Loading…
Cancel
Save