fix ghosts in spec

This commit is contained in:
Ryozuki 2019-04-23 19:22:58 +02:00
parent 34542e64b5
commit 87c797e84d
2 changed files with 6 additions and 18 deletions

View file

@ -51,15 +51,11 @@ void CNamePlates::RenderNameplate(
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(pPlayerInfo->m_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(pPlayerInfo->m_ClientID) != m_pClient->m_Teams.Team(m_pClient->m_Snap.m_LocalClientID);
if(m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_Solo && !Local)
OtherTeam = true;
if(!Local && m_pClient->m_aClients[pPlayerInfo->m_ClientID].m_Solo)
OtherTeam = true;
float FontSize = 18.0f + 20.0f * g_Config.m_ClNameplatesSize / 100.0f;
float FontSizeClan = 18.0f + 20.0f * g_Config.m_ClNameplatesClanSize / 100.0f;
// render name plate

View file

@ -242,15 +242,11 @@ void CPlayers::RenderHook(
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);
if(m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_Solo && !Local)
OtherTeam = true;
if(!Local && m_pClient->m_aClients[ClientID].m_Solo)
OtherTeam = true;
if(OtherTeam)
{
RenderInfo.m_ColorBody.a = g_Config.m_ClShowOthersAlpha / 100.0f;
@ -406,15 +402,11 @@ void CPlayers::RenderPlayer(
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);
if(m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_Solo && !Local)
OtherTeam = true;
if(!Local && m_pClient->m_aClients[ClientID].m_Solo)
OtherTeam = true;
// set size
RenderInfo.m_Size = 64.0f;