From 31d3899eaba6f23a6e51f5fa6b67a8a924e3aec5 Mon Sep 17 00:00:00 2001 From: terencehill Date: Mon, 13 Dec 2010 21:38:49 +0100 Subject: [PATCH] uid2name_dialog: fix coloring in a string and do not allow to enter in hud configure mode until an answer hasn't been given --- qcsrc/client/Main.qc | 2 ++ qcsrc/client/hud.qc | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 63cbfded7..6df7dfa09 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -618,6 +618,7 @@ void GameCommand(string msg) vote_prev = 0; cvar_set("cl_allow_uid2name", "1"); vote_change = -9999; + uid2name_dialog = 0; } else { @@ -632,6 +633,7 @@ void GameCommand(string msg) vote_prev = 0; cvar_set("cl_allow_uid2name", "0"); vote_change = -9999; + uid2name_dialog = 0; } else { diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index b7556a189..1d6af4793 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4021,12 +4021,18 @@ 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_configure) + { + vote_yescount = 0; + vote_nocount = 0; + print("^1You have to answer before entering hud configure mode\n"); + cvar_set("_hud_configure", "0"); + } + vote_called_vote = strzone("^2Name ^7instead of \"^1Unregistered player^7\" in stats"); + uid2name_dialog = 1; } if(!autocvar_hud_panel_vote && !autocvar__hud_configure) -- 2.39.2