From 88fb06d200b18e5e570c9139676b4d6e6ebad22e Mon Sep 17 00:00:00 2001 From: Lyberta Date: Mon, 3 Sep 2018 22:25:48 +0300 Subject: [PATCH] Teamplay: Don't send initial spectator team join notification. --- qcsrc/server/client.qc | 5 ----- qcsrc/server/teamplay.qc | 11 +++++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index ad7f8c47c..2d0ec2617 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -290,11 +290,6 @@ void PutObserverInServer(entity this) if(!game_stopped) if(autocvar_g_chat_nospectators == 1 || (!warmup_stage && autocvar_g_chat_nospectators == 2)) Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_CHAT_NOSPECTATORS); - - if(CS(this).just_joined) - { - CS(this).just_joined = false; - } } accuracy_resend(this); diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index b373d9f15..e52538de4 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -222,8 +222,15 @@ bool SetPlayerTeam(entity player, int team_index, int type) } else { - Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, - player.netname); + if (!CS(this).just_joined) + { + Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, + player.netname); + } + else + { + CS(this).just_joined = false; + } } KillPlayerForTeamChange(player); if (!IS_BOT_CLIENT(player)) -- 2.39.2