]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix "player is now spectating" message being displayed when switching from spectator...
authorterencehill <piuntn@gmail.com>
Thu, 24 Jan 2019 16:25:00 +0000 (17:25 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 24 Jan 2019 16:25:00 +0000 (17:25 +0100)
qcsrc/server/teamplay.qc

index d9682ed6acffcbfe81c791f43c578e08f0e8c58a..c19b85fe21bdf6bb0c892570bc77270cb3235d5a 100644 (file)
@@ -181,7 +181,7 @@ bool Player_SetTeamIndex(entity player, int index)
                {
                        // This is important when players join the game and one of their
                        // color matches the team color while other doesn't. For example
-                       // [BOT]Lion.
+                       // [BOT]Lion: color 0 4.
                        SetPlayerColors(player, new_team - 1);
                }
                return true;
@@ -236,7 +236,7 @@ bool SetPlayerTeam(entity player, int team_index, int type)
        }
        else if (team_index == -1)
        {
-               if (!CS(player).just_joined)
+               if (!CS(player).just_joined && player.frags != FRAGS_SPECTATOR)
                        Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, player.netname);
        }
        return true;