CGameClient: Removed needless call UpdateRenderInfo and fixed team-checks.

This commit is contained in:
Kaffeine 2010-09-22 20:26:46 +06:00 committed by oy
parent addf2882b8
commit 3684621589

View file

@ -802,10 +802,6 @@ void CGameClient::OnNewSnapshot()
m_ServerMode = SERVERMODE_PUREMOD;
}
// update render info
for(int i = 0; i < MAX_CLIENTS; i++)
m_aClients[i].UpdateRenderInfo();
}
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)
{
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_ColorBody = g_GameClient.m_pSkins->GetColor(TeamColors[m_Team]);