]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
scorefactor 0.5 is too much; default to 0.25; also, never cause teams to become empty...
authorRudolf Polzer <divverent@xonotic.org>
Fri, 6 Jul 2012 10:50:36 +0000 (12:50 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 6 Jul 2012 10:50:36 +0000 (12:50 +0200)
defaultXonotic.cfg
qcsrc/server/teamplay.qc

index faa1aabd060037ff2e745c0446e8307bd9f5cc4b..5e3924532c570025ea5957d575d0e22bfbdd9eae 100644 (file)
@@ -576,7 +576,7 @@ seta g_teamdamage_resetspeed 20     "for teamplay 4: how fast player's teamdamage co
 
 seta g_balance_teams 0 "automatically balance out players entering instead of asking them for their preferred team"
 seta g_balance_teams_prevent_imbalance 0       "prevent players from changing to larger teams"
-set g_balance_teams_scorefactor 0.5 "at the end of the game, take score into account instead of team size by this amount"
+set g_balance_teams_scorefactor 0.25 "at the end of the game, take score into account instead of team size by this amount (beware: values over 0.5 mean that a x:0 score imbalance will cause ALL new players to prefer the losing team at the end, despite numbers)"
 set g_tdm_teams 2 "how many teams are in team deathmatch (set by mapinfo)"
 seta g_tdm_teams_override 0    "how many teams are in team deathmatch"
 set g_tdm_team_spawns 0 "when 1, a map can define team spawnpoints for TDM"
index ed9927dd7ba1f557ba0fd3f5ea17cc2d6ec50571..f37167a498e268b98e4819ffaf099b10c7c5462d 100644 (file)
@@ -664,6 +664,14 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e)
                }
        }
        
+       // keep teams alive (teams of size 0 always count as smaller, ignoring score)
+       if(ca < 1)
+               if(cb >= 1)
+                       return TRUE;
+       if(ca >= 1)
+               if(cb < 1)
+                       return FALSE;
+
        // first, normalize
        f = max(ca, cb, 1);
        ca /= f;