From a72848e78032014adb1bf053c4556bf1072b0c2d Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 3 Jan 2011 12:50:38 +0100 Subject: added constants for teams by Choupom --- src/game/client/components/chat.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/game/client/components/chat.cpp') diff --git a/src/game/client/components/chat.cpp b/src/game/client/components/chat.cpp index b13eb615..3632b45d 100644 --- a/src/game/client/components/chat.cpp +++ b/src/game/client/components/chat.cpp @@ -231,15 +231,15 @@ void CChat::AddLine(int ClientId, int Team, const char *pLine) } else { - if(m_pClient->m_aClients[ClientId].m_Team == -1) - m_aLines[m_CurrentLine].m_NameColor = -1; + if(m_pClient->m_aClients[ClientId].m_Team == TEAM_SPECTATORS) + m_aLines[m_CurrentLine].m_NameColor = TEAM_SPECTATORS; if(m_pClient->m_Snap.m_pGameobj && m_pClient->m_Snap.m_pGameobj->m_Flags&GAMEFLAG_TEAMS) { - if(m_pClient->m_aClients[ClientId].m_Team == 0) - m_aLines[m_CurrentLine].m_NameColor = 0; - else if(m_pClient->m_aClients[ClientId].m_Team == 1) - m_aLines[m_CurrentLine].m_NameColor = 1; + if(m_pClient->m_aClients[ClientId].m_Team == TEAM_RED) + m_aLines[m_CurrentLine].m_NameColor = TEAM_RED; + else if(m_pClient->m_aClients[ClientId].m_Team == TEAM_BLUE) + m_aLines[m_CurrentLine].m_NameColor = TEAM_BLUE; } str_copy(m_aLines[m_CurrentLine].m_aName, m_pClient->m_aClients[ClientId].m_aName, sizeof(m_aLines[m_CurrentLine].m_aName)); @@ -353,11 +353,11 @@ void CChat::OnRender() TextRender()->TextColor(1.0f, 1.0f, 0.5f, Blend); // system else if(m_aLines[r].m_Team) TextRender()->TextColor(0.45f, 0.9f, 0.45f, Blend); // team message - else if(m_aLines[r].m_NameColor == 0) + else if(m_aLines[r].m_NameColor == TEAM_RED) TextRender()->TextColor(1.0f, 0.5f, 0.5f, Blend); // red - else if(m_aLines[r].m_NameColor == 1) + else if(m_aLines[r].m_NameColor == TEAM_BLUE) TextRender()->TextColor(0.7f, 0.7f, 1.0f, Blend); // blue - else if(m_aLines[r].m_NameColor == -1) + else if(m_aLines[r].m_NameColor == TEAM_SPECTATORS) TextRender()->TextColor(0.75f, 0.5f, 0.75f, Blend); // spectator else TextRender()->TextColor(0.8f, 0.8f, 0.8f, Blend); -- cgit 1.4.1