mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
CGameClient: Removed needless call UpdateRenderInfo and fixed team-checks.
This commit is contained in:
parent
addf2882b8
commit
3684621589
|
@ -801,11 +801,7 @@ void CGameClient::OnNewSnapshot()
|
||||||
else
|
else
|
||||||
m_ServerMode = SERVERMODE_PUREMOD;
|
m_ServerMode = SERVERMODE_PUREMOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// update render info
|
|
||||||
for(int i = 0; i < MAX_CLIENTS; i++)
|
|
||||||
m_aClients[i].UpdateRenderInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGameClient::OnPredict()
|
void CGameClient::OnPredict()
|
||||||
|
@ -942,7 +938,7 @@ void CGameClient::CClientData::UpdateRenderInfo()
|
||||||
if(g_GameClient.m_Snap.m_pGameobj && g_GameClient.m_Snap.m_pGameobj->m_Flags&GAMEFLAG_TEAMS)
|
if(g_GameClient.m_Snap.m_pGameobj && g_GameClient.m_Snap.m_pGameobj->m_Flags&GAMEFLAG_TEAMS)
|
||||||
{
|
{
|
||||||
const int TeamColors[2] = {65387, 10223467};
|
const int TeamColors[2] = {65387, 10223467};
|
||||||
if(m_Team >= 0 || m_Team <= 1)
|
if(m_Team >= 0 && m_Team <= 1)
|
||||||
{
|
{
|
||||||
m_RenderInfo.m_Texture = g_GameClient.m_pSkins->Get(m_SkinId)->m_ColorTexture;
|
m_RenderInfo.m_Texture = g_GameClient.m_pSkins->Get(m_SkinId)->m_ColorTexture;
|
||||||
m_RenderInfo.m_ColorBody = g_GameClient.m_pSkins->GetColor(TeamColors[m_Team]);
|
m_RenderInfo.m_ColorBody = g_GameClient.m_pSkins->GetColor(TeamColors[m_Team]);
|
||||||
|
|
Loading…
Reference in a new issue