mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Remove cl_nameplates_ha
and cl_nameplates_ha_size
This commit is contained in:
parent
5729cfe295
commit
ac543deabd
|
@ -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)
|
||||
|
|
|
@ -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)")
|
||||
|
|
Loading…
Reference in a new issue