X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=398df4f0164ddfb504c5cdcf90b86074dda590db;hb=910285b4709a25f6c3ee4b2980b8d3ebabb24c44;hp=f66e417489ba815bcd3fedfe40be2a600739f082;hpb=f36ed3bf423815c52ff68fc55e82a390e2171bdc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index f66e41748..398df4f01 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -3906,10 +3906,12 @@ float vote_change; // "time" when vote_active changed void HUD_VoteWindow(void) { + uid2name_dialog = 0; if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) { vote_active = 1; vote_called_vote = strzone(strcat("^2Name ^7instead of \"^1Unregistered player\"", " ^7in stats")); + uid2name_dialog = 1; } if(!autocvar_hud_panel_vote && !autocvar__hud_configure) @@ -3950,16 +3952,18 @@ void HUD_VoteWindow(void) active_panel = HUD_PANEL_VOTE; HUD_Panel_UpdateCvars(vote); - vector pos, mySize; - pos = panel_pos; - mySize = panel_size; - if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + if(uid2name_dialog) { panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight; panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight; } + // these must be below above block + vector pos, mySize; + pos = panel_pos; + mySize = panel_size; + a = vote_alpha * bound(cvar("hud_panel_vote_alreadyvoted_alpha"), 1 - vote_highlighted, 1); HUD_Panel_DrawBg(a); a = panel_fg_alpha * a; @@ -3989,7 +3993,7 @@ void HUD_VoteWindow(void) mySize = newSize; s = "A vote has been called for:"; - if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) + if(uid2name_dialog) s = "Allow servers to store and display your name?"; drawstring_aspect(pos, s, eX * mySize_x + eY * (2/8) * mySize_y, '1 1 1', a, DRAWFLAG_NORMAL); s = textShortenToWidth(vote_called_vote, mySize_x, '1 1 0' * mySize_y * (1/8), stringwidth_colors); @@ -3998,13 +4002,9 @@ void HUD_VoteWindow(void) drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize_y, s, eX * mySize_x + eY * (1.75/8) * mySize_y, a, DRAWFLAG_NORMAL); // print the yes/no counts - s = strcat("Yes (", getcommandkey("vyes", "vyes"), "): ", ftos(vote_yescount)); - if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) - s = strcat("Yes: (press y)"); + s = strcat("Yes (", getcommandkey("vyes", "vyes"), "): ", ftos(vote_yescount)); drawstring_aspect(pos + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '0 1 0', a, DRAWFLAG_NORMAL); - s = strcat("No (", getcommandkey("vno", "vno"), "): ", ftos(vote_nocount)); - if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE)) - s = strcat("No: (press n)"); + s = strcat("No (", getcommandkey("vno", "vno"), "): ", ftos(vote_nocount)); drawstring_aspect(pos + eX * 0.5 * mySize_x + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '1 0 0', a, DRAWFLAG_NORMAL); // draw the progress bar backgrounds