]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
score panel
authorFruitieX <rasse@rasse-lappy.localdomain>
Wed, 12 May 2010 16:51:23 +0000 (19:51 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Wed, 12 May 2010 16:51:23 +0000 (19:51 +0300)
defaultXonotic.cfg
qcsrc/client/hud.qc

index f38b107a62c6806b53e542f8213012dd21d13af0..980e9e5576df45405a0820e9aa941c675efc7b4a 100644 (file)
@@ -1397,7 +1397,7 @@ seta hud_radar_bg 1 "enable/disable the background of this panel"
 seta hud_radar_border 30 "size of border from the background edges"
 seta hud_radar_color "" "optional R G B vector of the panel background color, otherwise use hud default"
 
-seta hud_score 0 "enable/disable this panel"
+seta hud_score 1 "enable/disable this panel"
 seta hud_score_pos "-300 -37.5" "position of this base of the panel"
 seta hud_score_size "200 37.5" "size of this panel"
 seta hud_score_bg 1 "enable/disable the background of this panel"
index 44a9c7f40d040035328e588135b2b50bb1ce65f4..f0c108826e336b59680fa1a898f15218f184a841 100644 (file)
@@ -1641,11 +1641,16 @@ void HUD_Score()
                float max_fragcount;
                max_fragcount = -999;
 
+               float teamnum;
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
-                       if(tm.team == COLOR_SPECTATOR || !tm.team_size) // no players? don't display
+                       if(tm.team == COLOR_SPECTATOR || (!tm.team_size && !cvar("_hud_configure"))) // no players? don't display
                                continue;
                        score = tm.(teamscores[ts_primary]);
+                       if(cvar("_hud_configure"))
+                               score = 1337;
                        leader = 0;
+                       
+                       score_len = strlen(ftos(score));
 
                        if (score > max_fragcount)
                                max_fragcount = score;
@@ -1653,12 +1658,16 @@ void HUD_Score()
                        if(tm.team == myteam) {
                                if (max_fragcount == score)
                                        leader = 1;
-                               HUD_DrawXNum(score_pos, score, 4, 0, 34, GetTeamRGB(tm.team) * 0.8, leader, 1, hud_alpha_fg, DRAWFLAG_NORMAL);
+                               if (leader)
+                                       drawpic(pos + eX * mySize_x - eX * score_len * mySize_y - eX * 4 * 0.33 * mySize_y, strcat("gfx/hud/sb_highlight_", ftos(score_len)), eX * score_len * mySize_y + eY * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+                               HUD_DrawXNum(pos + eX * mySize_x - eX * 4 * mySize_y - eX * 4 * 0.33 * mySize_y, score, 4, 0, mySize_y, GetTeamRGB(tm.team) * 0.8, 0, 0, hud_alpha_fg, DRAWFLAG_NORMAL);
                        } else {
                                if (max_fragcount == score)
                                        leader = 1;
-                               HUD_DrawXNum(secondary_score_pos, score, 6, 0, 16, GetTeamRGB(tm.team) * 0.8, leader, 1, hud_alpha_fg, DRAWFLAG_NORMAL);
-                               secondary_score_pos = secondary_score_pos + '0 16 0';
+                               if (leader)
+                                       drawpic(pos + eX * mySize_x - eX * 0.33 * score_len * mySize_y + eY * 0.33 * mySize_y * teamnum, strcat("gfx/hud/sb_highlight_", ftos(score_len)), eX * 0.33 * score_len * mySize_y + eY * 0.33 * mySize_y, '1 1 1', hud_alpha_fg, DRAWFLAG_NORMAL);
+                               HUD_DrawXNum(pos + eX * mySize_x - eX * 4 * 0.33 * mySize_y + eY * 0.33 * mySize_y * teamnum, score, 4, 0, 0.33 * mySize_y, GetTeamRGB(tm.team) * 0.8, 0, 0, hud_alpha_fg, DRAWFLAG_NORMAL);
+                               teamnum += 1;
                        }
                }
        }