mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fix rendering of nameplates for spectating tees (bug introduced by #4870)
This commit is contained in:
parent
0157deae61
commit
e65bfa6350
|
@ -327,6 +327,10 @@ void CNamePlates::OnRender()
|
||||||
|
|
||||||
// don't render offscreen
|
// don't render offscreen
|
||||||
vec2 *pRenderPos = &m_pClient->m_aClients[i].m_RenderPos;
|
vec2 *pRenderPos = &m_pClient->m_aClients[i].m_RenderPos;
|
||||||
|
if(m_pClient->m_aClients[i].m_SpecCharPresent)
|
||||||
|
{
|
||||||
|
pRenderPos = &m_pClient->m_aClients[i].m_SpecChar;
|
||||||
|
}
|
||||||
if(pRenderPos->x < ScreenX0 || pRenderPos->x > ScreenX1 || pRenderPos->y < ScreenY0 || pRenderPos->y > ScreenY1)
|
if(pRenderPos->x < ScreenX0 || pRenderPos->x > ScreenX1 || pRenderPos->y < ScreenY0 || pRenderPos->y > ScreenY1)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
@ -336,10 +340,9 @@ void CNamePlates::OnRender()
|
||||||
{
|
{
|
||||||
RenderNameplatePos(m_pClient->m_aClients[i].m_SpecChar, pInfo, 0.4f, true);
|
RenderNameplatePos(m_pClient->m_aClients[i].m_SpecChar, pInfo, 0.4f, true);
|
||||||
}
|
}
|
||||||
|
else if(m_pClient->m_Snap.m_aCharacters[i].m_Active)
|
||||||
// only render active characters
|
|
||||||
if(m_pClient->m_Snap.m_aCharacters[i].m_Active)
|
|
||||||
{
|
{
|
||||||
|
// only render nameplates for active characters
|
||||||
RenderNameplate(
|
RenderNameplate(
|
||||||
&m_pClient->m_Snap.m_aCharacters[i].m_Prev,
|
&m_pClient->m_Snap.m_aCharacters[i].m_Prev,
|
||||||
&m_pClient->m_Snap.m_aCharacters[i].m_Cur,
|
&m_pClient->m_Snap.m_aCharacters[i].m_Cur,
|
||||||
|
|
Loading…
Reference in a new issue