mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Use IsOtherTeam for nameplates too
This commit is contained in:
parent
ddfcb62caa
commit
cd64204358
|
@ -28,7 +28,6 @@ void CNamePlates::RenderNameplate(
|
|||
)
|
||||
{
|
||||
int ClientID = pPlayerInfo->m_ClientID;
|
||||
bool Local = m_pClient->m_Snap.m_LocalClientID == ClientID;
|
||||
|
||||
vec2 Position;
|
||||
if(ClientID >= 0 && ClientID < MAX_CLIENTS)
|
||||
|
@ -36,17 +35,7 @@ void CNamePlates::RenderNameplate(
|
|||
else
|
||||
Position = mix(vec2(pPrevChar->m_X, pPrevChar->m_Y), vec2(pPlayerChar->m_X, pPlayerChar->m_Y), Client()->IntraGameTick());
|
||||
|
||||
bool OtherTeam = false;
|
||||
|
||||
if((m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_Team == TEAM_SPECTATORS && m_pClient->m_Snap.m_SpecInfo.m_SpectatorID == SPEC_FREEVIEW) || ClientID < 0)
|
||||
OtherTeam = false;
|
||||
else if(m_pClient->m_Snap.m_SpecInfo.m_Active && m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW)
|
||||
OtherTeam = m_pClient->m_Teams.Team(ClientID) != m_pClient->m_Teams.Team(m_pClient->m_Snap.m_SpecInfo.m_SpectatorID);
|
||||
else if((m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_Solo || m_pClient->m_aClients[ClientID].m_Solo) && !Local)
|
||||
OtherTeam = true;
|
||||
else
|
||||
OtherTeam = m_pClient->m_Teams.Team(ClientID) != m_pClient->m_Teams.Team(m_pClient->m_Snap.m_LocalClientID);
|
||||
|
||||
bool OtherTeam = m_pClient->IsOtherTeam(ClientID);
|
||||
|
||||
float FontSize = 18.0f + 20.0f * g_Config.m_ClNameplatesSize / 100.0f;
|
||||
float FontSizeClan = 18.0f + 20.0f * g_Config.m_ClNameplatesClanSize / 100.0f;
|
||||
|
|
Loading…
Reference in a new issue