]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Teamplay: Don't send initial spectator team join notification.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
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))