]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix & cleanup cl_vyes
authorFruitieX <fruitiex@gmail.com>
Tue, 30 Nov 2010 11:18:55 +0000 (13:18 +0200)
committerFruitieX <fruitiex@gmail.com>
Tue, 30 Nov 2010 11:18:55 +0000 (13:18 +0200)
defaultXonotic.cfg
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/hud.qc

index 90f4849d32e044104440889a66c83fbcd32a1401..7f1ac718d8e1ac34056589a9a617d58f223b310a 100644 (file)
@@ -1074,8 +1074,8 @@ alias vdoend "vdo endmatch"
 
 alias lsmaps "cmd lsmaps" // lists all maps on server (for vmap, suggestmap, vnextmap)
 alias lsnewmaps "cmd lsnewmaps" // lists all maps on server that do not yet have a record set (race/cts)
-bind F1 cl_vyes
-bind F2 cl_vno
+bind F1 cl_cmd vyes
+bind F2 cl_cmd vno
 
 //used for spectate/observer mode
 alias spec "cmd spectate"
index 8e47e6fa5bd880bc815444ae80c154985793ca6a..2d780381eedced49f15c67549f6455c535ae3a67 100644 (file)
@@ -271,3 +271,5 @@ string weaponorder_bypriority;
 float nex_charge_movingavg;
 
 float serverflags;
+
+float uid2name_dialog;
index 1a3608aa324d4bf4d0ecc619d359cb756657804a..c3d1afb6f421bf02725f8b68595004dcf9631a8e 100644 (file)
@@ -610,7 +610,7 @@ void GameCommand(string msg)
        }
     else if(cmd == "vyes")
     {
-        if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE) && panel_fg_alpha && !scoreboard_active) // don't lock keys before we actually see what's going on
+        if(uid2name_dialog)
         {
             vote_active = 0; // force the panel to disappear right as we have selected the value (to prevent it from fading out in the normal vote panel pos)
             vote_prev = 0;
@@ -624,7 +624,7 @@ void GameCommand(string msg)
     }
     else if(cmd == "vno")
     {
-        if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE) && panel_fg_alpha && !scoreboard_active) // don't lock keys before we actually see what's going on
+        if(uid2name_dialog)
         {
             vote_active = 0;
             vote_prev = 0;
index 759435e63d281a0233aca0b26ad7a3f3643be768..6697b35f2b945b1e432fbb5aac0ade65184ac950 100644 (file)
@@ -3849,10 +3849,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)
@@ -3894,7 +3896,7 @@ void HUD_VoteWindow(void)
        active_panel = HUD_PANEL_VOTE;
        HUD_Panel_UpdateCvars(vote);
 
-       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;
@@ -3934,7 +3936,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);