Fix cl_nameplates_own with antiping on when spectating

This commit is contained in:
def 2018-08-30 22:53:28 +02:00
parent c9f28ce094
commit ff8e97fbf8

View file

@ -31,11 +31,12 @@ void CNamePlates::RenderNameplate(
int ClientID = pPlayerInfo->m_ClientID; int ClientID = pPlayerInfo->m_ClientID;
vec2 Position; vec2 Position;
if(!m_pClient->AntiPingPlayers()) if((!m_pClient->AntiPingPlayers() && !pPlayerInfo->m_Local) || m_pClient->m_Snap.m_SpecInfo.m_Active)
{ {
if(!pPlayerInfo->m_Local)
Position = mix(vec2(pPrevChar->m_X, pPrevChar->m_Y), vec2(pPlayerChar->m_X, pPlayerChar->m_Y), IntraTick); Position = mix(vec2(pPrevChar->m_X, pPrevChar->m_Y), vec2(pPlayerChar->m_X, pPlayerChar->m_Y), IntraTick);
else }
else if(!m_pClient->AntiPingPlayers() && pPlayerInfo->m_Local)
{
Position = vec2(m_pClient->m_LocalCharacterPos.x, m_pClient->m_LocalCharacterPos.y); Position = vec2(m_pClient->m_LocalCharacterPos.x, m_pClient->m_LocalCharacterPos.y);
} }
else else