From dca637d4bb0a1beaa2034bd2207e5332c5e5a329 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 21 Mar 2023 04:25:32 +0300 Subject: [PATCH] engine: client: eliminate pfnServerCmd limit and, like GoldSrc, send our server command immediately to netchan --- engine/client/cl_game.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index fe3a71ad..358c2738 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -1727,14 +1727,12 @@ pfnServerCmd */ static int GAME_EXPORT pfnServerCmd( const char *szCmdString ) { - string buf; - if( !COM_CheckString( szCmdString )) return 0; // just like the client typed "cmd xxxxx" at the console - Q_snprintf( buf, sizeof( buf ) - 1, "cmd %s\n", szCmdString ); - Cbuf_AddText( buf ); + MSG_BeginClientCmd( &cls.netchan.message, clc_stringcmd ); + MSG_WriteString( &cls.netchan.message, szCmdString ); return 1; }