]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Teamplay: Don't send initial spectator team join notification.
authorLyberta <lyberta@lyberta.net>
Mon, 3 Sep 2018 19:25:48 +0000 (22:25 +0300)
committerLyberta <lyberta@lyberta.net>
Mon, 3 Sep 2018 19:25:48 +0000 (22:25 +0300)
qcsrc/server/client.qc
qcsrc/server/teamplay.qc

index ad7f8c47cd28c78148c334c21fa1a6ae9ae4b568..2d0ec2617b2c826dd9dff87608f0bf83752fbaf0 100644 (file)
@@ -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);
index b373d9f15a4739d06f30e1f324b4e366118785a7..e52538de476aef07fa80cc07e2df33462fe64939 100644 (file)
@@ -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))