From c79a649d9712100ffc66405a6e19d9875017de88 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 2 Nov 2021 12:46:59 +0600 Subject: [PATCH] engine: client: implement pfnFilteredClientCmd --- engine/client/cl_game.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_game.c b/engine/client/cl_game.c index b0a4dcca..7a2493f7 100644 --- a/engine/client/cl_game.c +++ b/engine/client/cl_game.c @@ -1744,6 +1744,20 @@ static int GAME_EXPORT pfnClientCmd( const char *szCmdString ) return 1; } +/* +============= +pfnFilteredClientCmd +============= +*/ +static int GAME_EXPORT pfnFilteredClientCmd( const char *szCmdString ) +{ + if( !COM_CheckString( szCmdString )) + return 0; + + Cbuf_AddFilteredText( szCmdString ); + Cbuf_AddFilteredText( "\n" ); +} + /* ============= pfnGetPlayerInfo @@ -3878,10 +3892,7 @@ static cl_enginefunc_t gEngfuncs = pfnGetAppID, Cmd_AliasGetList, pfnVguiWrap2_GetMouseDelta, - - // HACKHACK: added it here so it wouldn't cause overflow or segfault - // TODO: itself client command filtering is not implemented yet - pfnClientCmd + pfnFilteredClientCmd }; void CL_UnloadProgs( void )