From 435b95fc5ab3fc5b1a79212ffdc901a47769d056 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 31 Aug 2023 08:40:24 +0300 Subject: [PATCH] engine: client: don't write download notify outside of window --- engine/client/console.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engine/client/console.c b/engine/client/console.c index ef8a4b1c..10be8e58 100644 --- a/engine/client/console.c +++ b/engine/client/console.c @@ -1754,9 +1754,13 @@ void Con_DrawDebug( void ) if( scr_download.value != -1.0f ) { + int length; Q_snprintf( dlstring, sizeof( dlstring ), "Downloading [%d remaining]: ^2%s^7 %5.1f%% time %.f secs", host.downloadcount, host.downloadfile, scr_download.value, Sys_DoubleTime() - timeStart ); - x = refState.width - 500; + + Con_DrawStringLen( dlstring, &length, NULL ); + length = Q_max( length, 500 ); + x = refState.width - length * 1.05f; y = con.curFont->charHeight * 1.05f; Con_DrawString( x, y, dlstring, g_color_table[7] ); }