From d95080281f22918bb681328b669eacb003e043fb Mon Sep 17 00:00:00 2001 From: Bohdan Shulyar Date: Fri, 18 Jun 2021 05:40:38 +0300 Subject: [PATCH] Fix implicit conversion (#180) --- cl_dll/cl_util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cl_dll/cl_util.h b/cl_dll/cl_util.h index 7ba3bc7e..c4be7849 100644 --- a/cl_dll/cl_util.h +++ b/cl_dll/cl_util.h @@ -108,7 +108,8 @@ inline int TextMessageDrawChar( int x, int y, int number, int r, int g, int b ) inline int DrawConsoleString( int x, int y, const char *string ) { if( hud_textmode->value == 1 ) - return gHUD.DrawHudString( x, y, 9999, (char*)string, 255 * g_hud_text_color[0], 255 * g_hud_text_color[1], 255 * g_hud_text_color[2] ); + return gHUD.DrawHudString( x, y, 9999, (char*)string, (int)( (float)g_hud_text_color[0] * 255.0f ), + (int)( (float)g_hud_text_color[1] * 255.0f ), (int)( (float)g_hud_text_color[2] * 255.0f ) ); return gEngfuncs.pfnDrawConsoleString( x, y, (char*) string ); }