apply alpha to spec nameplates

This commit is contained in:
Edgar 2020-06-21 18:05:43 +02:00
parent f3466e05ba
commit 78bcc1d8fc
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85

View file

@ -113,10 +113,18 @@ void CNamePlates::RenderNameplate(
TColor.Set(rgb.r, rgb.g, rgb.b, g_Config.m_ClShowOthersAlpha / 100.0f); TColor.Set(rgb.r, rgb.g, rgb.b, g_Config.m_ClShowOthersAlpha / 100.0f);
} }
else else
{
if(!m_pClient->m_Snap.m_aCharacters[ClientID].m_Active)
{
TOutlineColor.Set(0.0f, 0.0f, 0.0f, 0.2f * g_Config.m_ClShowOthersAlpha / 100.0f);
TColor.Set(rgb.r, rgb.g, rgb.b, g_Config.m_ClShowOthersAlpha / 100.0f);
}
else
{ {
TOutlineColor.Set(0.0f, 0.0f, 0.0f, 0.5f*a); TOutlineColor.Set(0.0f, 0.0f, 0.0f, 0.5f*a);
TColor.Set(rgb.r, rgb.g, rgb.b, a); TColor.Set(rgb.r, rgb.g, rgb.b, a);
} }
}
if(g_Config.m_ClNameplatesTeamcolors && m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameFlags&GAMEFLAG_TEAMS) if(g_Config.m_ClNameplatesTeamcolors && m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameFlags&GAMEFLAG_TEAMS)
{ {
if(m_pClient->m_aClients[ClientID].m_Team == TEAM_RED) if(m_pClient->m_aClients[ClientID].m_Team == TEAM_RED)