From bbc39ba1e96c0156ab44618ae99ab3bb56b1ad14 Mon Sep 17 00:00:00 2001 From: ricardoofnl Date: Fri, 4 Sep 2026 19:18:29 +0700 Subject: [PATCH] [saco] Match the six-argument `CNewPlayerTags::Draw`; the label rect is a copy of the status rect taken before the measure --- saco/newplayertags.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/saco/newplayertags.cpp b/saco/newplayertags.cpp index 2aec09f..4c8b410 100644 --- a/saco/newplayertags.cpp +++ b/saco/newplayertags.cpp @@ -109,22 +109,19 @@ void CNewPlayerTags::Draw(D3DXVECTOR3* pPlayerPos, PCHAR szName, DWORD dwColor, if(Out.z > 1.0f) return; - int iX = (int)Out.x; - int iY = (int)Out.y; - RECT rectStatus; - rectStatus.left = iX; - rectStatus.top = iY; - rectStatus.right = iX; - rectStatus.bottom = iY; + rectStatus.left = (int)Out.x; + rectStatus.top = (int)Out.y; + rectStatus.right = (int)Out.x; + rectStatus.bottom = (int)Out.y; + + RECT rectText = rectStatus; SIZE size = pDefaultFont->MeasureText2(szName, 0); - RECT rectText; - rectText.left = iX - size.cx / 2; - rectText.top = iY + 17 - size.cy; - rectText.right = iX + size.cx / 2; - rectText.bottom = iY; + rectText.left -= size.cx / 2; + rectText.right += size.cx / 2; + rectText.top += 17 - size.cy; pDefaultFont->RenderText(m_pSprite, szName, rectText, 256, dwColor, 1); if(bNameTagStatus) @@ -156,7 +153,7 @@ void CNewPlayerTags::Draw(D3DXVECTOR3* pPlayerPos, PCHAR szName, DWORD dwColor, pFont2->DrawText(NULL, "C", 1, &rectStatus, DT_NOCLIP|DT_VCENTER|DT_CENTER, 0xFF000000); rectStatus.top -= 2; rectStatus.left--; - pFont1->DrawText(NULL, "E", 1, &rectStatus, DT_NOCLIP|DT_VCENTER|DT_CENTER, 0xFFE3E3E3); + pFont1->DrawText(NULL, "E", 1, &rectStatus, DT_NOCLIP|DT_VCENTER|DT_CENTER, 0xFFE3E1E3); } } }