From 5043d85bbf5246ed541db900a95d3f18c01be602 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Thu, 6 Oct 2011 16:38:58 +0200 Subject: [PATCH] if server has playerstats, show uid2name dialog too --- qcsrc/client/hud.qc | 2 +- qcsrc/common/constants.qh | 1 + qcsrc/server/playerstats.qc | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) 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); -- 2.39.2