From 155b8c343b9964f34757de2ccf5f31ad9d4bdd78 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Mon, 31 Jan 2022 16:21:09 -0800 Subject: [PATCH] Font_StringWidth: Fix me being tired and not returning anything valid in this --- src/client/font.qc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/font.qc b/src/client/font.qc index 28c585e3..48a1ca8d 100644 --- a/src/client/font.qc +++ b/src/client/font.qc @@ -156,8 +156,10 @@ Font_GetHeight(font_s fnt) float Font_StringWidth(string strText, float flColors, font_s fnt) { + float w; drawfont = (float)fnt.iID; - stringwidth(strText, flColors, [(float)fnt.iScaleX,(float)fnt.iScaleY]); + w = stringwidth(strText, flColors, [fnt.iScaleX, fnt.iScaleY]); drawfont = 0; drawfontscale = [1,1,0]; + return w; }