GameContext: Use SERVER_DEMO_CLIENT instead of a magic number

This commit is contained in:
Alexander Akulich 2023-02-03 21:05:57 +03:00
parent 971e1b0093
commit f5d7174c36

View file

@ -403,7 +403,7 @@ void CGameContext::SendChatTarget(int To, const char *pText, int Flags)
Msg.m_pMessage = pText;
if(g_Config.m_SvDemoChat)
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, -1);
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, SERVER_DEMO_CLIENT);
if(To == -1)
{
@ -462,7 +462,7 @@ void CGameContext::SendChat(int ChatterClientID, int Team, const char *pText, in
// pack one for the recording only
if(g_Config.m_SvDemoChat)
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, -1);
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, SERVER_DEMO_CLIENT);
// send to the clients
for(int i = 0; i < Server()->MaxClients(); i++)
@ -489,7 +489,7 @@ void CGameContext::SendChat(int ChatterClientID, int Team, const char *pText, in
// pack one for the recording only
if(g_Config.m_SvDemoChat)
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, -1);
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL | MSGFLAG_NOSEND, SERVER_DEMO_CLIENT);
// send to the clients
for(int i = 0; i < Server()->MaxClients(); i++)