Also highlight name of dummy

This commit is contained in:
def 2014-05-17 22:45:44 +02:00
parent 266ead772d
commit 78d29e3301

View file

@ -339,14 +339,23 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine)
m_aLines[m_CurrentLine].m_NameColor = -2;
// check for highlighted name
const char *pHL = str_find_nocase(pLine, m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_aName);
const char *pHL = str_find_nocase(pLine, m_pClient->m_aClients[m_pClient->Client()->m_LocalIDs[0]].m_aName);
if(pHL)
{
int Length = str_length(m_pClient->m_aClients[m_pClient->m_Snap.m_LocalClientID].m_aName);
int Length = str_length(m_pClient->m_aClients[m_pClient->Client()->m_LocalIDs[0]].m_aName);
if((pLine == pHL || pHL[-1] == ' ') && (pHL[Length] == 0 || pHL[Length] == ' ' || pHL[Length] == '.' || pHL[Length] == '!' || pHL[Length] == ',' || pHL[Length] == '?' || pHL[Length] == ':'))
Highlighted = true;
}
m_aLines[m_CurrentLine].m_Highlighted = Highlighted;
pHL = str_find_nocase(pLine, m_pClient->m_aClients[m_pClient->Client()->m_LocalIDs[1]].m_aName);
if(pHL)
{
int Length = str_length(m_pClient->m_aClients[m_pClient->Client()->m_LocalIDs[1]].m_aName);
if((pLine == pHL || pHL[-1] == ' ') && (pHL[Length] == 0 || pHL[Length] == ' ' || pHL[Length] == '.' || pHL[Length] == '!' || pHL[Length] == ',' || pHL[Length] == '?' || pHL[Length] == ':'))
Highlighted = true;
}
m_aLines[m_CurrentLine].m_Highlighted = Highlighted;
if(ClientID == -1) // server message
{