]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Remove cvar default value from a tooltip. Add some comments to make clear what Playe...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 7257156a9693b44b28b4b2ed7698d11702f507eb..80892e652891804e7fa6f83ff2f4cd623dcdd840 100644 (file)
@@ -120,7 +120,7 @@ int Team_GetNumberOfAliveTeams()
        return result;
 }
 
-int Team_GetWinnerTeam_WIthOwnedItems(int min_control_points)
+int Team_GetWinnerTeam_WithOwnedItems(int min_control_points)
 {
        int winner = 0;
        for (int i = 0; i < NUM_TEAMS; ++i)
@@ -246,7 +246,7 @@ bool SetPlayerTeam(entity player, int team_index, int type)
        if (team_index != old_team_index)
        {
                KillPlayerForTeamChange(player);
-               PlayerScore_Clear(player);
+               PlayerScore_Clear(player); // works only in game modes without teams
                CS(player).parm_idlesince = time;
 
                if (!IS_BOT_CLIENT(player))
@@ -714,7 +714,7 @@ void TeamBalance_GetTeamCounts(entity balance, entity ignore)
                        }
                        int team_num;
                        // TODO: Reconsider when the player is truly on the team.
-                       if (IS_CLIENT(it) || (it.caplayer))
+                       if (IS_CLIENT(it) || INGAME(it))
                        {
                                team_num = it.team;
                        }