]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Merge branch 'martin-t/nottarg' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 00cf58e26567e8978dd89a5c93d12cea5726291f..cf21de4bfd3978ac2942e03eb0e7ccafa6234318 100644 (file)
@@ -190,7 +190,7 @@ void KillPlayerForTeamChange(entity player)
        {
                return;
        }
-       Damage(player, player, player, 100000, DEATH_TEAMCHANGE.m_id, player.origin,
+       Damage(player, player, player, 100000, DEATH_TEAMCHANGE.m_id, DMG_NOWEP, player.origin,
                '0 0 0');
 }
 
@@ -864,7 +864,7 @@ void JoinBestTeam(entity this, bool force_best_team)
        // find out what teams are available
        CheckAllowedTeams(this);
 
-       // if we don't care what team they ends up on, put them on whatever team they entered as.
+       // if we don't care what team they end up on, put them on whatever team they entered as.
        // if they're not on a valid team, then let other code put them on the smallest team
        if (!force_best_team)
        {
@@ -1038,6 +1038,10 @@ void AutoBalanceBots(int source_team, int destination_team)
                        break;
                }
        }
+       if (num_players_source_team < 0)
+       {
+               return;
+       }
        switch (destination_team)
        {
                case 1: