From 4b05cf43995b62784f6dc76843262cdc4f671021 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 31 Aug 2022 02:46:33 +0300 Subject: [PATCH] engine: client: better fix for notify debug messages, rely on host.allow_console variable to don't allow uninitialized console usage --- engine/client/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/client/console.c b/engine/client/console.c index 3a5ea4a0..21f76b67 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -2051,7 +2051,7 @@ void Con_DrawDebug( void ) timeStart = Sys_DoubleTime(); } - if( Cvar_VariableInteger( "cl_background" ) || Cvar_VariableInteger( "sv_background" )) + if( !host.allow_console || Cvar_VariableInteger( "cl_background" ) || Cvar_VariableInteger( "sv_background" )) return; if( con.draw_notify && !Con_Visible( )) @@ -2077,7 +2077,7 @@ void Con_DrawNotify( void ) x = con.curFont->charWidths[' ']; // offset one space at left screen side - if( !Cvar_VariableInteger( "cl_background" ) && !Cvar_VariableInteger( "sv_background" )) + if( host.allow_console && ( !Cvar_VariableInteger( "cl_background" ) && !Cvar_VariableInteger( "sv_background" ))) { for( i = CON_LINES_COUNT - con.num_times; i < CON_LINES_COUNT; i++ ) {