From: terencehill Date: Tue, 26 Apr 2011 16:03:08 +0000 (+0200) Subject: Show rankings in the score panel in team games too, with all the team scores in the... X-Git-Tag: xonotic-v0.5.0~269^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b2827ccd3e346537e86bf134e05c54e1ab38aaa;p=xonotic%2Fxonotic-data.pk3dir.git Show rankings in the score panel in team games too, with all the team scores in the first line --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 16249a026..80dc21bef 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1438,7 +1438,7 @@ seta hud_panel_radar_rotation 0 "rotation mode: you set what points up. 0 = play seta hud_panel_radar_zoommode 0 "zoom mode: 0 = zoomed by default, 1 = zoomed when +zoom, 2 = always zoomed, 3 = always zoomed out" alias hud_panel_radar_rotate "toggle hud_panel_radar_rotation 0 1 2 3 4" -seta hud_panel_score_rankings 0 "show rankings in non-team games instead of the score difference: 1 always show my own score; 2 pure rankings" +seta hud_panel_score_rankings 0 "show rankings: 1 always show my own score; 2 pure rankings" seta hud_panel_engineinfo_framecounter_time 0.1 "time between framerate display updates" seta hud_panel_engineinfo_framecounter_decimals 0 "amount of decimals to show" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 19b2a2489..5277d3629 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2579,7 +2579,7 @@ void HUD_Radar(void) // Score (#7) // void HUD_UpdatePlayerTeams(); -void HUD_Score_Rankings(vector pos, vector mySize, entity me) +void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count) { float score; entity tm, pl; @@ -2595,12 +2595,28 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) const float name_size = mySize_x*0.75; const float highlight_alpha = 0.2; - float i, me_printed; + float i, me_printed, first_pl; string s; + i, first_pl = 0; if (autocvar__hud_configure) { + if (team_count) + { + // show team scores in the first line + float score_size = mySize_x / team_count; + for(tm = teams.sort_next; tm; tm = tm.sort_next) { + if(tm.team == COLOR_SPECTATOR) + continue; + if (tm.team == myteam) + HUD_Panel_DrawHighlight(pos - eY * (height * (1 - 0.9) / 2) + eX * score_size * i, eX * score_size + eY * height, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring_aspect(pos + eX * score_size * i, ftos(123), eX * score_size + eY * fontsize_y, GetTeamRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); + ++i; + } + first_pl = 1; + pos_y += height; + } score = 10 + SCOREPANEL_MAX_ENTRIES * 3; - for (i=0; i