mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Render the tee being spectated after everyone else.
This commit is contained in:
parent
b458890f08
commit
25ffc421cc
|
@ -836,10 +836,12 @@ void CPlayers::OnRender()
|
|||
RenderTools()->RenderTee(CAnimState::GetIdle(), &RenderInfoSpec, EMOTE_BLINK, vec2(1, 0), m_aClient.m_SpecChar);
|
||||
}
|
||||
|
||||
// render everyone else's tee, then our own
|
||||
// render everyone else's tee, then either our own or the tee we are spectating.
|
||||
const int RenderLastID = (m_pClient->m_Snap.m_SpecInfo.m_SpectatorID != SPEC_FREEVIEW && m_pClient->m_Snap.m_SpecInfo.m_Active) ? m_pClient->m_Snap.m_SpecInfo.m_SpectatorID : LocalClientID;
|
||||
|
||||
for(int ClientID = 0; ClientID < MAX_CLIENTS; ClientID++)
|
||||
{
|
||||
if(ClientID == LocalClientID || !m_pClient->m_Snap.m_aCharacters[ClientID].m_Active || !IsPlayerInfoAvailable(ClientID))
|
||||
if(ClientID == RenderLastID || !m_pClient->m_Snap.m_aCharacters[ClientID].m_Active || !IsPlayerInfoAvailable(ClientID))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -854,11 +856,11 @@ void CPlayers::OnRender()
|
|||
}
|
||||
RenderPlayer(&m_pClient->m_aClients[ClientID].m_RenderPrev, &m_pClient->m_aClients[ClientID].m_RenderCur, &aRenderInfo[ClientID], ClientID);
|
||||
}
|
||||
if(LocalClientID != -1 && m_pClient->m_Snap.m_aCharacters[LocalClientID].m_Active && IsPlayerInfoAvailable(LocalClientID))
|
||||
if(RenderLastID != -1 && m_pClient->m_Snap.m_aCharacters[RenderLastID].m_Active && IsPlayerInfoAvailable(RenderLastID))
|
||||
{
|
||||
const CGameClient::CClientData *pLocalClientData = &m_pClient->m_aClients[LocalClientID];
|
||||
RenderHookCollLine(&pLocalClientData->m_RenderPrev, &pLocalClientData->m_RenderCur, LocalClientID);
|
||||
RenderPlayer(&pLocalClientData->m_RenderPrev, &pLocalClientData->m_RenderCur, &aRenderInfo[LocalClientID], LocalClientID);
|
||||
const CGameClient::CClientData *pClientData = &m_pClient->m_aClients[RenderLastID];
|
||||
RenderHookCollLine(&pClientData->m_RenderPrev, &pClientData->m_RenderCur, RenderLastID);
|
||||
RenderPlayer(&pClientData->m_RenderPrev, &pClientData->m_RenderCur, &aRenderInfo[RenderLastID], RenderLastID);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue