r5473 - in trunk/data: . qcsrc/server
esteel at icculus.org
esteel at icculus.org
Fri Jan 9 11:45:05 EST 2009
Author: esteel
Date: 2009-01-09 11:45:04 -0500 (Fri, 09 Jan 2009)
New Revision: 5473
Modified:
trunk/data/cvars.txt
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/server/miscfunctions.qc
trunk/data/qcsrc/server/teamplay.qc
Log:
rip out the server side teamsize comlaining (bprint/centerprint) as the clientside hint should be enough now
Modified: trunk/data/cvars.txt
===================================================================
--- trunk/data/cvars.txt 2009-01-09 14:47:51 UTC (rev 5472)
+++ trunk/data/cvars.txt 2009-01-09 16:45:04 UTC (rev 5473)
@@ -441,7 +441,6 @@
"g_balance_shotgun_secondary_refire" "TODO: describe me"
"g_balance_shotgun_secondary_spread" "TODO: describe me"
"g_balance_teams" "TODO: describe me"
-"g_balance_teams_complain" "TODO: describe me"
"g_balance_teams_force" "TODO: describe me"
"g_balance_teams_prevent_imbalance" "TODO: describe me"
"g_balance_uzi_first_ammo" "TODO: describe me"
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2009-01-09 14:47:51 UTC (rev 5472)
+++ trunk/data/defaultNexuiz.cfg 2009-01-09 16:45:04 UTC (rev 5473)
@@ -390,7 +390,6 @@
set deathmatch_force_teamplay 0 // always play TDM on dm maps
seta g_balance_teams 0 // automatically balance out players entering instead of asking them for their preferred team
seta g_balance_teams_force 0 // automatically balance out teams when players move or disconnect
-seta g_balance_teams_complain 0 // when 1, complain when team balance is off
seta g_balance_teams_prevent_imbalance 0 // prevent players from changing to larger teams
seta g_tdm_teams 2 // how many teams are in team deathmatch
set g_changeteam_banned 0 // not allowed to change team
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2009-01-09 14:47:51 UTC (rev 5472)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2009-01-09 16:45:04 UTC (rev 5473)
@@ -627,7 +627,6 @@
#define CENTERPRIO_POINT 1
#define CENTERPRIO_SPAM 2
-#define CENTERPRIO_REBALANCE 2
#define CENTERPRIO_VOTE 4
#define CENTERPRIO_NORMAL 5
#define CENTERPRIO_SHIELDING 7
Modified: trunk/data/qcsrc/server/teamplay.qc
===================================================================
--- trunk/data/qcsrc/server/teamplay.qc 2009-01-09 14:47:51 UTC (rev 5472)
+++ trunk/data/qcsrc/server/teamplay.qc 2009-01-09 16:45:04 UTC (rev 5473)
@@ -165,7 +165,7 @@
float fraglimit_override, timelimit_override;
VoteReset();
-
+
teams_matter = 0;
cvar_set("teamplay", "0");
@@ -179,7 +179,7 @@
world.maxs = mi_max;
MapInfo_LoadMapSettings(mapname);
-
+
if not(cvar_value_issafe(world.fog))
{
print("The current map contains a potentially harmful fog setting, ignored\n");
@@ -482,7 +482,7 @@
if (cache_mutatormsg != "") {
s = strcat(s, "\n\n^8special gameplay tips: ^7", cache_mutatormsg);
}
-
+
if(cache_lastmotd != cvar_string("sv_motd"))
{
if(cache_lastmotd)
@@ -1203,43 +1203,13 @@
centerprint(selected, strcat("You have been moved into a different team to improve team balance\nYou are now on: ", ColoredTeamName(selected.team)));
}
-float lastRebalanceInfo;
void CauseRebalance(float source_team, float howmany_toomany)
{
- float steam;
- entity head;
-
if(IsTeamBalanceForced() == 1)
{
bprint("Rebalancing Teams\n");
ShufflePlayerOutOfTeam(source_team);
}
- else
- {
- if(cvar("g_balance_teams_complain"))
- if(howmany_toomany < cvar("g_balance_teams_complain"))
- return;
- if(time < lastRebalanceInfo + 90)
- return;
- lastRebalanceInfo = time;
- if(source_team == 1)
- steam = COLOR_TEAM1;
- else if(source_team == 2)
- steam = COLOR_TEAM2;
- else if(source_team == 3)
- steam = COLOR_TEAM3;
- else if(source_team == 4)
- steam = COLOR_TEAM4;
- print("Team ", ftos(source_team), " too large, complaining.\n");
- FOR_EACH_REALPLAYER(head)
- {
- if(head.team == steam)
- {
- sprint(head, "\{1}\{13}^3SERVER NOTICE:^7 One of you please change teams!\n");
- centerprint_atprio(head, CENTERPRIO_REBALANCE, "^3SERVER NOTICE:\n\n^7Someone of you please change teams!");
- }
- }
- }
}
// part of g_balance_teams_force
@@ -1314,8 +1284,6 @@
audit_teams_time = time + 0.7 + random()*0.3;
}
-
-
// code from here on is just to support maps that don't have team entities
void tdm_spawnteam (string teamname, float teamcolor)
{
More information about the nexuiz-commits
mailing list