From ac543deabdb41100666ea9ee9b2f643518089aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Mon, 13 Jun 2022 22:05:36 +0200 Subject: [PATCH] Remove `cl_nameplates_ha` and `cl_nameplates_ha_size` --- src/game/client/components/nameplates.cpp | 34 ----------------------- src/game/variables.h | 2 -- 2 files changed, 36 deletions(-) diff --git a/src/game/client/components/nameplates.cpp b/src/game/client/components/nameplates.cpp index b19814e4b..0c5dc9125 100644 --- a/src/game/client/components/nameplates.cpp +++ b/src/game/client/components/nameplates.cpp @@ -196,40 +196,6 @@ void CNamePlates::RenderNameplatePos(vec2 Position, const CNetObj_PlayerInfo *pP TextRender()->TextColor(rgb); TextRender()->Text(0, Position.x - XOffset, YOffset, FontSize, aBuf, -1.0f); } - - if(g_Config.m_ClNameplatesHA) // render health and armor in nameplate - { - int Health = m_pClient->m_Snap.m_aCharacters[ClientID].m_Cur.m_Health; - int Armor = m_pClient->m_Snap.m_aCharacters[ClientID].m_Cur.m_Armor; - - if(Health > 0 || Armor > 0) - { - float HFontSize = 5.0f + 20.0f * g_Config.m_ClNameplatesHASize / 100.0f; - float AFontSize = 6.0f + 24.0f * g_Config.m_ClNameplatesHASize / 100.0f; - char aHealth[40] = "\0"; - char aArmor[40] = "\0"; - for(int i = 0; i < Health; i++) - str_append(aHealth, "♥", sizeof(aHealth)); - for(int i = Health; i < 10; i++) - str_append(aHealth, "♡", sizeof(aHealth)); - str_append(aHealth, "\0", sizeof(aHealth)); - for(int i = 0; i < Armor; i++) - str_append(aArmor, "⚫", sizeof(aArmor)); - for(int i = Armor; i < 10; i++) - str_append(aArmor, "⚪", sizeof(aArmor)); - str_append(aArmor, "\0", sizeof(aArmor)); - - YOffset -= HFontSize + AFontSize; - float PosHealth = TextRender()->TextWidth(0, HFontSize, aHealth, -1, -1.0f); - TextRender()->TextColor(ColorRGBA(1.0f, 0.0f, 0.0f)); - TextRender()->Text(0, Position.x - PosHealth / 2.0f, YOffset, HFontSize, aHealth, -1); - - YOffset -= -AFontSize + 3.0f; - float PosArmor = TextRender()->TextWidth(0, AFontSize, aArmor, -1, -1.0f); - TextRender()->TextColor(ColorRGBA(1.0f, 1.0f, 0.0f)); - TextRender()->Text(0, Position.x - PosArmor / 2.0f, YOffset, AFontSize, aArmor, -1); - } - } } if((g_Config.m_Debug || g_Config.m_ClNameplatesStrong) && g_Config.m_ClNameplates) diff --git a/src/game/variables.h b/src/game/variables.h index efbb74b0c..2779b497d 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -24,8 +24,6 @@ MACRO_CONFIG_INT(ClNameplatesSize, cl_nameplates_size, 50, 0, 100, CFGFLAG_CLIEN MACRO_CONFIG_INT(ClNameplatesClan, cl_nameplates_clan, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show clan in name plates") MACRO_CONFIG_INT(ClNameplatesClanSize, cl_nameplates_clan_size, 30, 0, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Size of the clan plates from 0 to 100%") MACRO_CONFIG_INT(ClNameplatesIDs, cl_nameplates_ids, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show IDs in name plates") -MACRO_CONFIG_INT(ClNameplatesHA, cl_nameplates_ha, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show Health and Armor in name plates") -MACRO_CONFIG_INT(ClNameplatesHASize, cl_nameplates_ha_size, 50, 0, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Size of the health and armor nameplates from 0 to 100%") MACRO_CONFIG_INT(ClNameplatesOwn, cl_nameplates_own, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show own name plate (useful for demo recording)") MACRO_CONFIG_INT(ClNameplatesFriendMark, cl_nameplates_friendmark, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show friend mark (♥) in name plates") MACRO_CONFIG_INT(ClNameplatesStrong, cl_nameplates_strong, 0, 0, 2, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show strong/weak in name plates (0 - off, 1 - icons, 2 - icons + numbers)")