From 3203d9a0439259073c05920d93000fada2fa68f7 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 3 Nov 2021 23:23:15 +0600 Subject: [PATCH] engine: client: wire Cbuf_AddFilteredText to svc_stufftext commands --- engine/client/cl_parse.c | 8 ++++---- engine/client/cl_qparse.c | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/engine/client/cl_parse.c b/engine/client/cl_parse.c index 8b931009..ce230215 100644 --- a/engine/client/cl_parse.c +++ b/engine/client/cl_parse.c @@ -2226,11 +2226,11 @@ void CL_ParseServerMessage( sizebuf_t *msg, qboolean normal_message ) case svc_stufftext: s = MSG_ReadString( msg ); #ifdef HACKS_RELATED_HLMODS - // dsiable Cry Of Fear antisave protection + // disable Cry Of Fear antisave protection if( !Q_strnicmp( s, "disconnect", 10 ) && cls.signon != SIGNONS ) break; // too early #endif - Cbuf_AddText( s ); + Cbuf_AddFilteredText( s ); break; case svc_setangle: CL_ParseSetAngle( msg ); @@ -2994,13 +2994,13 @@ void CL_ParseLegacyServerMessage( sizebuf_t *msg, qboolean normal_message ) case svc_stufftext: s = MSG_ReadString( msg ); #ifdef HACKS_RELATED_HLMODS - // dsiable Cry Of Fear antisave protection + // disable Cry Of Fear antisave protection if( !Q_strnicmp( s, "disconnect", 10 ) && cls.signon != SIGNONS ) break; // too early #endif Con_Reportf( "Stufftext: %s", s ); - Cbuf_AddText( s ); + Cbuf_AddFilteredText( s ); break; case svc_setangle: CL_ParseSetAngle( msg ); diff --git a/engine/client/cl_qparse.c b/engine/client/cl_qparse.c index be3015ad..bfdf753e 100644 --- a/engine/client/cl_qparse.c +++ b/engine/client/cl_qparse.c @@ -825,6 +825,9 @@ CL_QuakeStuffText void CL_QuakeStuffText( const char *text ) { Q_strncat( cmd_buf, text, sizeof( cmd_buf )); + + // a1ba: didn't filtered, anyway quake protocol + // only supported for demos, not network games Cbuf_AddText( text ); }