From: Rudolf Polzer Date: Thu, 6 Oct 2011 14:38:58 +0000 (+0200) Subject: if server has playerstats, show uid2name dialog too X-Git-Tag: xonotic-v0.6.0~40^2~83 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=5043d85bbf5246ed541db900a95d3f18c01be602 if server has playerstats, show uid2name dialog too --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 89bc19d59..fb47d9598 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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) diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 9c4057873..c59901b21 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -715,3 +715,4 @@ float HUD_MENU_ENABLE = 0; #define SERVERFLAG_ALLOW_FULLBRIGHT 1 #define SERVERFLAG_TEAMPLAY 2 +#define SERVERFLAG_PLAYERSTATS 4 diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index eb812baba..8fee566fd 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -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);