From: Lyberta Date: Mon, 3 Sep 2018 19:25:48 +0000 (+0300) Subject: Teamplay: Don't send initial spectator team join notification. X-Git-Tag: xonotic-v0.8.5~1899^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=88fb06d200b18e5e570c9139676b4d6e6ebad22e;p=xonotic%2Fxonotic-data.pk3dir.git Teamplay: Don't send initial spectator team join notification. --- 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))