]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Switch to QC-based setcolor implementation, don't fall back to engine player values
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 61f250f12a757bc492e885971796987674407e3f..9b4455fcfd0c5cbb42605d1e1edf5a7c981f1949 100644 (file)
@@ -160,7 +160,7 @@ int Team_GetNumberOfTeamsWithOwnedItems()
 
 void setcolor(entity this, int clr)
 {
-#if 0
+#if 1
        this.clientcolors = clr;
        this.team = (clr & 15) + 1;
 #else
@@ -246,8 +246,7 @@ bool SetPlayerTeam(entity player, int team_index, int type)
        if (team_index != old_team_index)
        {
                KillPlayerForTeamChange(player);
-               PlayerScore_Clear(player);
-               CS(player).parm_idlesince = time;
+               PlayerScore_Clear(player); // works only in game modes without teams
 
                if (!IS_BOT_CLIENT(player))
                        TeamBalance_AutoBalanceBots();
@@ -528,7 +527,7 @@ entity TeamBalance_CheckAllowedTeams(entity for_whom)
        }
 
        // TODO: Balance quantity of bots across > 2 teams when bot_vs_human is set (and remove next line)
-       if (autocvar_bot_vs_human && AvailableTeams() == 2 && for_whom)
+       if (autocvar_bot_vs_human && AVAILABLE_TEAMS == 2 && for_whom)
        {
                if (autocvar_bot_vs_human > 0)
                {