]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Merge branch 'martin-t/warns' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 239fb69f0ca8e0e4b20b1da78d8e44897b4e6e5b..d9682ed6acffcbfe81c791f43c578e08f0e8c58a 100644 (file)
@@ -227,10 +227,6 @@ bool SetPlayerTeam(entity player, int team_index, int type)
                                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE,
                                        player.netname);
                        }
-                       else
-                       {
-                               CS(player).just_joined = false;
-                       }
                }
                KillPlayerForTeamChange(player);
                if (!IS_BOT_CLIENT(player))
@@ -238,6 +234,11 @@ bool SetPlayerTeam(entity player, int team_index, int type)
                        TeamBalance_AutoBalanceBots();
                }
        }
+       else if (team_index == -1)
+       {
+               if (!CS(player).just_joined)
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, player.netname);
+       }
        return true;
 }
 
@@ -1013,7 +1014,7 @@ void LogTeamChange(float player_id, float team_number, int type)
        {
                return;
        }
-       GameLogEcho(sprintf(":team:%f:%f:%f", player_id, team_number, type));
+       GameLogEcho(sprintf(":team:%d:%d:%d", player_id, team_number, type));
 }
 
 void KillPlayerForTeamChange(entity player)