From 3b5107a87417ab42118c1bb66229f6b93acce03b Mon Sep 17 00:00:00 2001 From: Jordy Ruiz Date: Thu, 31 Jan 2019 15:37:20 +0100 Subject: [PATCH] Fix missing GetClientIdRectSize in textwidth computation for score hud --- src/game/client/components/hud.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index fa9de4d64..a92008bda 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -292,7 +292,7 @@ void CHud::RenderScoreHud() int ID = aPlayerInfo[t].m_ClientID; char aName[64]; str_format(aName, sizeof(aName), "%s", g_Config.m_ClShowsocial ? m_pClient->m_aClients[ID].m_aName : ""); - float w = TextRender()->TextWidth(0, 8.0f, aName, -1); + float w = TextRender()->TextWidth(0, 8.0f, aName, -1) + RenderTools()->GetClientIdRectSize(8.0f); CTextCursor Cursor; float x = min(Whole-w-1.0f, Whole-ScoreWidthMax-ImageSize-2*Split-PosSize);