mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
GameContext: Use SERVER_DEMO_CLIENT instead of a magic number
This commit is contained in:
parent
971e1b0093
commit
f5d7174c36
|
@ -403,7 +403,7 @@ void CGameContext::SendChatTarget(int To, const char *pText, int Flags)
|
||||||
Msg.m_pMessage = pText;
|
Msg.m_pMessage = pText;
|
||||||
|
|
||||||
if(g_Config.m_SvDemoChat)
|
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)
|
if(To == -1)
|
||||||
{
|
{
|
||||||
|
@ -462,7 +462,7 @@ void CGameContext::SendChat(int ChatterClientID, int Team, const char *pText, in
|
||||||
|
|
||||||
// pack one for the recording only
|
// pack one for the recording only
|
||||||
if(g_Config.m_SvDemoChat)
|
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
|
// send to the clients
|
||||||
for(int i = 0; i < Server()->MaxClients(); i++)
|
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
|
// pack one for the recording only
|
||||||
if(g_Config.m_SvDemoChat)
|
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
|
// send to the clients
|
||||||
for(int i = 0; i < Server()->MaxClients(); i++)
|
for(int i = 0; i < Server()->MaxClients(); i++)
|
||||||
|
|
Loading…
Reference in a new issue