]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Add a stat for warmup limit so the hud timer can show decreasing time and announcer...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 71f3bf48a796dfb136d8e7bc89197fdb49a46a69..fabeaeced96f4e41b2476aaad022b9e4176eac82 100644 (file)
@@ -499,7 +499,7 @@ float FindSmallestTeam(entity pl, float ignore_pl)
        return RandomSelection_chosen_float;
 }
 
-float JoinBestTeam(entity pl, float only_return_best, float forcebestteam)
+int JoinBestTeam(entity pl, bool only_return_best, bool forcebestteam)
 {SELFPARAM();
        float smallest, selectedteam;
 
@@ -568,7 +568,7 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam)
 
                LogTeamchange(pl.playerid, pl.team, 2); // log auto join
 
-               if(pl.deadflag == DEAD_NO)
+               if(!IS_DEAD(pl))
                        Damage(pl, pl, pl, 100000, DEATH_TEAMCHANGE.m_id, pl.origin, '0 0 0');
        }
 
@@ -660,7 +660,7 @@ void SV_ChangeTeam(float _color)
        if(IS_PLAYER(self) && steam != dteam)
        {
                // kill player when changing teams
-               if(self.deadflag == DEAD_NO)
+               if(!IS_DEAD(self))
                        Damage(self, self, self, 100000, DEATH_TEAMCHANGE.m_id, self.origin, '0 0 0');
        }
 }
@@ -797,7 +797,7 @@ void ShufflePlayerOutOfTeam (float source_team)
        TeamchangeFrags(selected);
        SetPlayerTeam(selected, smallestteam, source_team, false);
 
-       if(selected.deadflag == DEAD_NO)
+       if(!IS_DEAD(selected))
                Damage(selected, selected, selected, 100000, DEATH_AUTOTEAMCHANGE.m_id, selected.origin, '0 0 0');
        Send_Notification(NOTIF_ONE, selected, MSG_CENTER, CENTER_DEATH_SELF_AUTOTEAMCHANGE, selected.team);
 }