r5465 - trunk/data/qcsrc/client
esteel at icculus.org
esteel at icculus.org
Fri Jan 9 08:25:25 EST 2009
Author: esteel
Date: 2009-01-09 08:25:24 -0500 (Fri, 09 Jan 2009)
New Revision: 5465
Modified:
trunk/data/qcsrc/client/sbar.qc
Log:
fix the team size hint, stupid me
Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc 2009-01-09 12:37:54 UTC (rev 5464)
+++ trunk/data/qcsrc/client/sbar.qc 2009-01-09 13:25:24 UTC (rev 5465)
@@ -1567,21 +1567,28 @@
if(teamplay)
{
entity tm;
- float scrhigh, scrlow;
+ float init, size;
tm = teams.sort_next;
if (tm)
{
- scrhigh = tm.team_size;
- scrlow = tm.team_size;
for(; tm.sort_next; tm = tm.sort_next)
{
- scrhigh = max(scrhigh, tm.team_size);
- scrlow = min(scrlow, tm.team_size);
+ if(!tm.team_size || tm.team == COLOR_SPECTATOR)
+ continue;
+ if(!init) {
+ size = tm.team_size;
+ init = true;
+ }
+ size = min(size, tm.team_size);
}
- if ((scrhigh - scrlow) > 1)
+ if (init)
{
- s = strcat(blinkcolor, "Teamnumbers are unbalanced! Press ^3", getcommandkey("team menu", "menu_showteamselect"), blinkcolor, " to adjust");
- o = Sbar_DrawNoteLine(o, s);
+ tm = GetTeam(GetPlayerColor(player_localentnum), false);
+ if (tm && (tm.team_size - size) > 1)
+ {
+ s = strcat(blinkcolor, "Teamnumbers are unbalanced! Press ^3", getcommandkey("team menu", "menu_showteamselect"), blinkcolor, " to adjust");
+ o = Sbar_DrawNoteLine(o, s);
+ }
}
}
}
More information about the nexuiz-commits
mailing list