X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fscore.qc;h=49a8fa5b7a465f2e362098031df2dce86a05a178;hb=a0ed889293e46f6068423089f2a7f24c7f494d37;hp=dd3000c4cb6ffe1f51b09761b23e710c9f3394b5;hpb=c741e6b3f012aa525f23e1df30d1d933b383fbc5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/score.qc b/qcsrc/client/hud/panel/score.qc index dd3000c4c..49a8fa5b7 100644 --- a/qcsrc/client/hud/panel/score.qc +++ b/qcsrc/client/hud/panel/score.qc @@ -1,3 +1,9 @@ +#include "score.qh" + +#include +#include +#include + // Score (#7) void HUD_UpdatePlayerTeams(); @@ -46,7 +52,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) { rgb = '1 1 0'; drawfill(pos, eX * mySize.x + eY * fontsize.y, rgb, highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); - s = GetPlayerName(player_localnum); + s = entcs_GetName(player_localnum); score = 7; } else @@ -74,6 +80,8 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) for(tm = teams.sort_next; tm; tm = tm.sort_next) { if(tm.team == NUM_SPECTATOR) continue; + if(!tm.team && teamplay) + 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); @@ -114,7 +122,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me) } if (team_count) score_color = Team_ColorRGB(pl.team) * 0.8; - s = textShortenToWidth(GetPlayerName(pl.sv_entnum), name_size, fontsize, stringwidth_colors); + 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); pos.y += fontsize.y; @@ -136,6 +144,10 @@ void HUD_Score() pos = panel_pos; mySize = panel_size; + if (autocvar_hud_panel_score_dynamichud) + HUD_Scale_Enable(); + else + HUD_Scale_Disable(); HUD_Panel_DrawBg(1); if(panel_bg_padding) { @@ -269,6 +281,8 @@ void HUD_Score() for(tm = teams.sort_next; tm; tm = tm.sort_next) { if(tm.team == NUM_SPECTATOR) continue; + if(!tm.team && teamplay) + continue; score = tm.(teamscores[ts_primary]); if(autocvar__hud_configure) score = 123;