misplace silent mode

This commit is contained in:
Henri Derycke 2018-11-25 15:48:22 +01:00 committed by nheir
parent 412db81508
commit 9450a9e72d
2 changed files with 6 additions and 2 deletions

View file

@ -601,6 +601,10 @@ void CGameContext::OnClientEnter(int ClientID)
NewClientInfoMsg.m_pClan = Server()->ClientClan(ClientID);
NewClientInfoMsg.m_Country = Server()->ClientCountry(ClientID);
NewClientInfoMsg.m_Silent = false;
if(g_Config.m_SvSilentSpectatorMode && m_apPlayers[ClientID]->GetTeam() == TEAM_SPECTATORS)
NewClientInfoMsg.m_Silent = true;
for(int p = 0; p < 6; p++)
{
NewClientInfoMsg.m_apSkinPartNames[p] = m_apPlayers[ClientID]->m_TeeInfos.m_aaSkinPartNames[p];
@ -690,6 +694,8 @@ void CGameContext::OnClientDrop(int ClientID, const char *pReason)
Msg.m_ClientID = ClientID;
Msg.m_pReason = pReason;
Msg.m_Silent = false;
if(g_Config.m_SvSilentSpectatorMode && m_apPlayers[ClientID]->GetTeam() == TEAM_SPECTATORS)
Msg.m_Silent = true;
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL|MSGFLAG_NORECORD, -1);
}

View file

@ -1104,8 +1104,6 @@ void IGameController::DoTeamChange(CPlayer *pPlayer, int Team, bool DoChatMsg)
Msg.m_ClientID = ClientID;
Msg.m_Team = Team;
Msg.m_Silent = DoChatMsg ? 0 : 1;
if(g_Config.m_SvSilentSpectatorMode && Team == TEAM_SPECTATORS)
Msg.m_Silent = 1;
Msg.m_CooldownTick = pPlayer->m_TeamChangeTick;
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, -1);