From: terencehill Date: Sun, 14 Nov 2010 19:14:05 +0000 (+0100) Subject: Cvar hud_panel_score_rankings to enable rankings not only when observing X-Git-Tag: xonotic-v0.5.0~415 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d84113dda35d5a86e870a53db9f97032d27d04c6;p=xonotic%2Fxonotic-data.pk3dir.git Cvar hud_panel_score_rankings to enable rankings not only when observing --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index af48f639d..bb5dfcf87 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1395,6 +1395,8 @@ 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 distribution" + 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" seta hud_panel_engineinfo_framecounter_exponentialmovingaverage 1 "use an averaging method for calculating fps instead of counting frametime like engine does" diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index b0a814b79..30d0406f2 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3636,7 +3636,7 @@ void HUD_Score(void) drawstring_aspect(pos, timer, eX * 0.75 * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawfont = hud_font; } else if (!teamplay) { // non-teamgames - if (spectatee_status == -1) + if (spectatee_status == -1 || cvar("hud_panel_score_rankings")) { #define SCOREPANEL_MAX_ENTRIES 6 #define SCOREPANEL_ASPECTRATIO 2 diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_score.c b/qcsrc/menu/xonotic/dialog_hudpanel_score.c index 8c8561ea7..6a9417923 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_score.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_score.c @@ -71,5 +71,10 @@ void XonoticHUDScoreDialog_fill(entity me) for(i = 0; i <= 10; ++i) e.addValue(e, strzone(ftos_decimals(i - 5, 0)), strzone(ftos(i - 5))); e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 2, e = makeXonoticTextLabel(0, "Score:")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 3.8, e = makeXonoticCheckBox(0, "hud_panel_score_rankings", "Show rankings in non-team games")); } #endif