]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
if server has playerstats, show uid2name dialog too
authorRudolf Polzer <divVerent@xonotic.org>
Thu, 6 Oct 2011 14:38:58 +0000 (16:38 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Thu, 6 Oct 2011 14:38:58 +0000 (16:38 +0200)
qcsrc/client/hud.qc
qcsrc/common/constants.qh
qcsrc/server/playerstats.qc

index 89bc19d5982a4d3cb4412c64a6281736b8e985c3..fb47d959858b1bca87eab296b767f860173e8202 100644 (file)
@@ -2929,7 +2929,7 @@ float vote_change; // "time" when vote_active changed
 
 void HUD_VoteWindow(void) 
 {
-       if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
+       if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE || (serverflags & SERVERFLAG_PLAYERSTATS)))
        {
                vote_active = 1;
                if (autocvar__hud_configure)
index 9c40578739b3ae00744a63dc3fd0e14bd827a250..c59901b21475b5c7e505aee04a4167dcca0d0cbd 100644 (file)
@@ -715,3 +715,4 @@ float HUD_MENU_ENABLE               = 0;
 
 #define SERVERFLAG_ALLOW_FULLBRIGHT 1
 #define SERVERFLAG_TEAMPLAY 2
+#define SERVERFLAG_PLAYERSTATS 4
index eb812babae2e9bcf67cfdb045f570871dcdd3220..8fee566fd36e2476570d0a59cf99dde50506d669 100644 (file)
@@ -17,7 +17,9 @@ void PlayerStats_Init()
        playerstats_db = db_create();
        if(playerstats_db >= 0)
                playerstats_waitforme = FALSE; // must wait for it at match end
-       
+
+       serverflags |= SERVERFLAG_PLAYERSTATS;  
+
        PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
        PlayerStats_AddEvent(PLAYERSTATS_WINS);
        PlayerStats_AddEvent(PLAYERSTATS_MATCHES);