mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Render players in other teams half transparent
This commit is contained in:
parent
11dc90206b
commit
6e67cd0540
|
@ -705,9 +705,19 @@ void CPlayers::RenderPlayer(
|
|||
}
|
||||
|
||||
RenderInfo.m_Size = 64.0f; // force some settings
|
||||
RenderInfo.m_ColorBody.a = 1.0f;
|
||||
RenderInfo.m_ColorFeet.a = 1.0f;
|
||||
RenderTools()->RenderTee(&State, &RenderInfo, Player.m_Emote, Direction, Position);
|
||||
bool Alpha = m_pClient->m_Teams.Team(pInfo.m_ClientID) != m_pClient->m_Teams.Team(m_pClient->m_Snap.m_LocalClientID);
|
||||
if (Alpha)
|
||||
{
|
||||
RenderInfo.m_ColorBody.a = 0.5f;
|
||||
RenderInfo.m_ColorFeet.a = 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderInfo.m_ColorBody.a = 1.0f;
|
||||
RenderInfo.m_ColorFeet.a = 1.0f;
|
||||
}
|
||||
|
||||
RenderTools()->RenderTee(&State, &RenderInfo, Player.m_Emote, Direction, Position, Alpha);
|
||||
|
||||
if(Player.m_PlayerFlags&PLAYERFLAG_CHATTING)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue