[nexuiz-commits] r8122 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Oct 13 22:59:07 EDT 2009
Author: samual
Date: 2009-10-13 22:59:07 -0400 (Tue, 13 Oct 2009)
New Revision: 8122
Modified:
trunk/data/qcsrc/client/sbar.qc
Log:
Make highlighted rows better by using sbar_color_bg_* when not spectating or in a team match.
Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc 2009-10-13 18:58:22 UTC (rev 8121)
+++ trunk/data/qcsrc/client/sbar.qc 2009-10-14 02:59:07 UTC (rev 8122)
@@ -839,27 +839,28 @@
void Sbar_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_number)
{
- vector tmp, plteamrgb;
- plteamrgb = GetTeamRGB(pl.team);
+ vector tmp, rgb;
+ rgb = GetTeamRGB(pl.team);
string str;
float i, field;
float is_spec;
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
-
+
+ if((rgb == '1 1 1') && (!is_spec)) {
+ rgb_x = cvar("sbar_color_bg_r") + 0.5;
+ rgb_y = cvar("sbar_color_bg_g") + 0.5;
+ rgb_z = cvar("sbar_color_bg_b") + 0.5; }
+
// Layout:
tmp_x = sbwidth;
tmp_y = sbar_fontsize_y * 1.25;
tmp_z = 0;
// alternated rows highlighting
- if (is_self)
- drawfill(pos - '1 1 0', tmp + '2 0 0', plteamrgb, sbar_scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
- else
- {
- if (sbar_scoreboard_highlight)
- if(!mod(pl_number,2))
- drawfill(pos - '1 1 0', tmp + '2 0 0', plteamrgb, sbar_scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
- }
+ if(is_self)
+ drawfill(pos - '1 1 0', tmp + '2 0 0', rgb, sbar_scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
+ else if((sbar_scoreboard_highlight) && (!mod(pl_number,2)))
+ drawfill(pos - '1 1 0', tmp + '2 0 0', rgb, sbar_scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
tmp_y = 0;
More information about the nexuiz-commits
mailing list