X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fscore.qc;h=10aec79ff6939f663dea3139994111e894a21f8c;hb=35fe966e3c374eca5e6ec63028506db0ad31a289;hp=c7128b1eb4feb531530f6e4b0315cb24d38df656;hpb=678b11c9f70884a1a9c96700d4545fc7b8ad2884;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index c7128b1eb..10aec79ff 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -1,12 +1,21 @@ #include "score.qh" +#include +#include +#include #include "scoreboard.qh" #include #include +#include // Score (#7) -void HUD_UpdatePlayerTeams(); +void HUD_Score_Export(int fh) +{ + // allow saving cvars that aesthetically change the panel into hud skin files + HUD_Write_Cvar("hud_panel_score_rankings"); +} + void HUD_Score_Rankings(vector pos, vector mySize, entity me) { float score; @@ -36,8 +45,8 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) players_per_team = max(2, ceil((entries - 1) / team_count)); for(i=0; i 3) @@ -272,7 +282,7 @@ void HUD_Score() } } else - score_size = eX * mySize.x*(1/4) + eY * mySize.y*(1/3); + score_size = vec2(mySize.x / 4, mySize.y / 3); float max_fragcount; max_fragcount = -99; @@ -281,9 +291,10 @@ void HUD_Score() for(tm = teams.sort_next; tm; tm = tm.sort_next) { if(tm.team == NUM_SPECTATOR) continue; - if(!tm.team && teamplay) + if(!tm.team) continue; - score = tm.(teamscores[ts_primary]); + + score = tm.(teamscores(ts_primary)); if(autocvar__hud_configure) score = 123; @@ -292,7 +303,7 @@ void HUD_Score() if (spectatee_status == -1) { - score_pos = pos + eX * column * (score_size.x + offset.x) + eY * row * (score_size.y + offset.y); + score_pos = pos + vec2(column * (score_size.x + offset.x), row * (score_size.y + offset.y)); if (max_fragcount == score) HUD_Panel_DrawHighlight(score_pos, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); drawstring_aspect(score_pos, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); @@ -305,12 +316,12 @@ void HUD_Score() } else if(tm.team == myteam) { if (max_fragcount == score) - HUD_Panel_DrawHighlight(pos, eX * 0.75 * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring_aspect(pos, ftos(score), eX * 0.75 * mySize.x + eY * mySize.y, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawHighlight(pos, vec2(0.75 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring_aspect(pos, ftos(score), vec2(0.75 * mySize.x, mySize.y), Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); } else { if (max_fragcount == score) - HUD_Panel_DrawHighlight(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - drawstring_aspect(pos + eX * 0.75 * mySize.x + eY * (1/3) * rows * mySize.y, ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawHighlight(pos + vec2(0.75 * mySize.x, (1/3) * rows * mySize.y), score_size, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring_aspect(pos + vec2(0.75 * mySize.x, (1/3) * rows * mySize.y), ftos(score), score_size, Team_ColorRGB(tm.team) * 0.8, panel_fg_alpha, DRAWFLAG_NORMAL); ++rows; } }