X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fclient%2Fsbar.qc;h=d856adabb9a7c5b87f803ef18492ed297d71b45a;hb=ceea9aed4596cc127c93a7fc973261b0e684b0e4;hp=527872bcdef423d7a959192a835d1673073849cf;hpb=2026983b0096a9a0ee0cfbb1468db8f7fb399206;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 527872bc..d856adab 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -919,6 +919,7 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) string str; float f, field, field_number; + vector hl_color; field_number = 3; // the number of components each row has for(fieldcounter = 1; fieldcounter <= field_number; ++fieldcounter) @@ -932,12 +933,13 @@ void Sbar_PrintStomachboardItem(vector pos, entity pl) if(getstati(STAT_VORE_EATEN)) { if(teamplay && GetPlayerColor(pl.entnum - 1) == GetPlayerColor(player_localentnum - 1)) // same team - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color2")), cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color2")); else - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color3")), cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color3")); } else - drawfill(pos - '0 0 0', '193 11 0', stov(cvar_string("sbar_stomachboard_color1")), cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color1")); + drawfill(pos - '0 0 0', '193 11 0', hl_color, cvar("sbar_stomachboard_highlight_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); } if(field == ST_NAME) { @@ -1943,13 +1945,13 @@ void Sbar_Timer() minutes = minutesLeft; seconds = secondsLeft; if (minutes == 0) - bgpos_x = topright_x - (58 + 7 + 12) * scale; + bgpos_x = topright_x - (46 + 17 + 12) * scale; else if (minutes < 10) // nudge the timer background left if more digits are drawn - bgpos_x = topright_x - (66 + 17 + 12) * scale; + bgpos_x = topright_x - (54 + 17 + 12) * scale; else if (minutes < 100) - bgpos_x = topright_x - (74 + 17 + 12) * scale; + bgpos_x = topright_x - (62 + 17 + 12) * scale; else - bgpos_x = topright_x - (82 + 17 + 12) * scale; + bgpos_x = topright_x - (70 + 17 + 12) * scale; bgpos_y = 0; bgpos_z = 0; } @@ -2928,19 +2930,23 @@ void Sbar_Draw (void) } } + vector hl_color; + string hl_string; if(getstati(STAT_VORE_EATEN)) { if(teamplay && GetPlayerColor(getstati(STAT_VORE_EATEN) - 1) == GetPlayerColor(player_localentnum - 1)) // same team - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color2"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color2")); else - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color3"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-80 173 0', "predator:", '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color3")); + hl_string = "predator:"; } else { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(stov(cvar_string("sbar_stomachboard_color1"))), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); - drawstring(bottomleft - '-80 173 0', "self:", '11 11 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); + hl_color = stov(cvar_string("sbar_stomachboard_color1")); + hl_string = "self:"; } + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', StomachStatus_ColorFade(hl_color), cvar("sbar_stomachboard_status_alpha") * sbar_alpha_fg, DRAWFLAG_NORMAL); + drawstring(bottomleft - '-80 173 0', hl_string, '11 11 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); float stomach_load; stomach_load = getstati(STAT_VORE_LOAD); // shows the predator's stomach load when we are eaten, and ours otherwise