diff options
| author | oy <Tom_Adams@web.de> | 2011-01-03 12:50:38 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-01-03 12:50:38 +0100 |
| commit | a72848e78032014adb1bf053c4556bf1072b0c2d (patch) | |
| tree | 5a9da24803f3432c79229b87abe77b6235668e19 /src/game/client/components/chat.cpp | |
| parent | b29b6d0bcff3d22fe5dac3453689fb8d315cf3ee (diff) | |
| download | zcatch-a72848e78032014adb1bf053c4556bf1072b0c2d.tar.gz zcatch-a72848e78032014adb1bf053c4556bf1072b0c2d.zip | |
added constants for teams by Choupom
Diffstat (limited to 'src/game/client/components/chat.cpp')
| -rw-r--r-- | src/game/client/components/chat.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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); |