mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Render transparency properly when spectating
This commit is contained in:
parent
6e67cd0540
commit
97d7037011
|
@ -705,7 +705,18 @@ void CPlayers::RenderPlayer(
|
|||
}
|
||||
|
||||
RenderInfo.m_Size = 64.0f; // force some settings
|
||||
bool Alpha = m_pClient->m_Teams.Team(pInfo.m_ClientID) != m_pClient->m_Teams.Team(m_pClient->m_Snap.m_LocalClientID);
|
||||
bool Alpha;
|
||||
|
||||
if (m_pClient->m_Snap.m_SpecInfo.m_Active)
|
||||
{
|
||||
if (m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW)
|
||||
Alpha = false;
|
||||
else
|
||||
Alpha = m_pClient->m_Teams.Team(pInfo.m_ClientID) != m_pClient->m_Teams.Team(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID);
|
||||
}
|
||||
else
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue