]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/score.qc
Merge branch 'master' into TimePath/scoreboard_elo
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / score.qc
index b07b84ed33f8001c34779cea4a7bddd9d4db5813..c2fc694d64b2f99b740f6ad4e4258bcb57c0c656 100644 (file)
@@ -84,7 +84,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                                continue;
                        if (tm.team == myteam)
                                drawfill(pos + eX * score_size * i, eX * score_size + eY * fontsize.y, '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores[ts_primary])), eX * score_size + eY * fontsize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(pos + eX * score_size * i, ftos(tm.(teamscores(ts_primary))), eX * score_size + eY * fontsize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL);
                        ++i;
                }
                first_pl = 1;
@@ -124,7 +124,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me)
                        score_color = Team_ColorRGB(pl.team) * 0.8;
                s = textShortenToWidth(entcs_GetName(pl.sv_entnum), name_size, fontsize, stringwidth_colors);
                drawcolorcodedstring(pos + eX * (name_size - stringwidth(s, true, fontsize)), s, fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
-               drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores[ps_primary])), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawstring(pos + eX * (name_size + spacing_size), ftos(pl.(scores(ps_primary))), fontsize, score_color, panel_fg_alpha, DRAWFLAG_NORMAL);
                pos.y += fontsize.y;
                ++i;
        }
@@ -162,23 +162,23 @@ void HUD_Score()
 
        me = playerslots[current_player];
 
-       if((scores_flags[ps_primary] & SFL_TIME) && !teamplay) { // race/cts record display on HUD
+       if((scores_flags(ps_primary) & SFL_TIME) && !teamplay) { // race/cts record display on HUD
                string timer, distrtimer;
 
                pl = players.sort_next;
                if(pl == me)
                        pl = pl.sort_next;
-               if(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)
-                       if(pl.scores[ps_primary] == 0)
+               if(scores_flags(ps_primary) & SFL_ZERO_IS_WORST)
+                       if(pl.scores(ps_primary) == 0)
                                pl = NULL;
 
-               score = me.(scores[ps_primary]);
+               score = me.(scores(ps_primary));
                timer = TIME_ENCODED_TOSTRING(score);
 
                draw_beginBoldFont();
-               if (pl && ((!(scores_flags[ps_primary] & SFL_ZERO_IS_WORST)) || score)) {
+               if (pl && ((!(scores_flags(ps_primary) & SFL_ZERO_IS_WORST)) || score)) {
                        // distribution display
-                       distribution = me.(scores[ps_primary]) - pl.(scores[ps_primary]);
+                       distribution = me.(scores(ps_primary)) - pl.(scores(ps_primary));
 
                        distrtimer = ftos_decimals(fabs(distribution/pow(10, TIME_DECIMALS)), TIME_DECIMALS);
 
@@ -211,11 +211,11 @@ void HUD_Score()
                if(autocvar__hud_configure)
                        distribution = 42;
                else if(pl)
-                       distribution = me.(scores[ps_primary]) - pl.(scores[ps_primary]);
+                       distribution = me.(scores(ps_primary)) - pl.(scores(ps_primary));
                else
                        distribution = 0;
 
-               score = me.(scores[ps_primary]);
+               score = me.(scores(ps_primary));
                if(autocvar__hud_configure)
                        score = 123;
 
@@ -283,7 +283,7 @@ void HUD_Score()
                                continue;
                        if(!tm.team && teamplay)
                                continue;
-                       score = tm.(teamscores[ts_primary]);
+                       score = tm.(teamscores(ts_primary));
                        if(autocvar__hud_configure)
                                score = 123;