]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index d7b9a7ae0e7d6305ef86a5994b2b3e09f2edef80..adfa40aeb6050de44535abf2368ba6dfe901f2ef 100644 (file)
@@ -507,7 +507,7 @@ void PutPlayerInServer(entity this)
        accuracy_resend(this);
 
        if (this.team < 0)
-               JoinBestTeam(this, false, true);
+               JoinBestTeam(this, true);
 
        entity spot = SelectSpawnPoint(this, false);
        if (!spot) {
@@ -654,9 +654,11 @@ void PutPlayerInServer(entity this)
 
        PHYS_INPUT_BUTTON_ATCK(this) = PHYS_INPUT_BUTTON_JUMP(this) = PHYS_INPUT_BUTTON_ATCK2(this) = false;
 
+       // player was spectator
        if (CS(this).killcount == FRAGS_SPECTATOR) {
                PlayerScore_Clear(this);
                CS(this).killcount = 0;
+               CS(this).startplaytime = time;
        }
 
        for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
@@ -875,7 +877,7 @@ void ClientKill_Now_TeamChange(entity this)
 {
        if(this.killindicator_teamchange == -1)
        {
-               JoinBestTeam( this, false, true );
+               JoinBestTeam( this, true );
        }
        else if(this.killindicator_teamchange == -2)
        {
@@ -1187,7 +1189,7 @@ void ClientConnect(entity this)
     {
         int id = this.playerid;
         this.playerid = 0; // silent
-           JoinBestTeam(this, false, false); // if the team number is valid, keep it
+           JoinBestTeam(this, false); // if the team number is valid, keep it
            this.playerid = id;
     }
 
@@ -2000,7 +2002,7 @@ void Join(entity this)
 
        if(!this.team_selected)
        if(autocvar_g_campaign || autocvar_g_balance_teams)
-               JoinBestTeam(this, false, true);
+               JoinBestTeam(this, true);
 
        if(autocvar_g_campaign)
                campaign_bots_may_start = true;