X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fscore.qc;h=525bf614b8be11e0cd01c075ec857b61c2937090;hp=c2fc694d64b2f99b740f6ad4e4258bcb57c0c656;hb=93afc08b09294e6dea4d0c98ce5226fdee9d1c92;hpb=81d3d953ba1e2b8ffba849b17bad98170216a754 diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index c2fc694d64..525bf614b8 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -1,12 +1,15 @@ #include "score.qh" -#include +#include +#include +#include +#include "scoreboard.qh" #include #include +#include // Score (#7) -void HUD_UpdatePlayerTeams(); void HUD_Score_Rankings(vector pos, vector mySize, entity me) { float score; @@ -36,8 +39,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 +276,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,8 +285,9 @@ 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)); if(autocvar__hud_configure) score = 123; @@ -292,7 +297,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 +310,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; } }