From 3fd824079d169103363301476bdecacd5fc368ed Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 26 Jul 2008 17:57:44 +0000 Subject: [PATCH] allow hiding the LMS rank column (as the players are sorted right anyway) git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3930 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/client/sbar.qc | 4 ++++ data/qcsrc/common/constants.qh | 5 +++++ data/qcsrc/server/teamplay.qc | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index bdb795328..271ecc735 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -427,6 +427,10 @@ void Cmd_Sbar_SetFields(float argc) ++sbar_num_fields; } + if(scores_flags[ps_primary] & SFL_ALLOW_HIDE) + have_primary = 1; + if(scores_flags[ps_secondary] & SFL_ALLOW_HIDE) + have_secondary = 1; if(ps_primary == ps_secondary) have_secondary = 1; missing = !have_primary + !have_secondary + !have_separator + !have_name; diff --git a/data/qcsrc/common/constants.qh b/data/qcsrc/common/constants.qh index 2ea08b4f0..1759335e9 100644 --- a/data/qcsrc/common/constants.qh +++ b/data/qcsrc/common/constants.qh @@ -204,6 +204,11 @@ const float MAPVOTE_NET_OWNVOTE = 3; */ #define SFL_HIDE_ZERO 2 +/** + * Allow a column to be hidden (do not automatically add it even if it is a sorting key) + */ +#define SFL_ALLOW_HIDE 16 + /** * Scoring priority (NOTE: PRIMARY is used for fraglimit) */ diff --git a/data/qcsrc/server/teamplay.qc b/data/qcsrc/server/teamplay.qc index 23ee0d340..48ed84b8d 100644 --- a/data/qcsrc/server/teamplay.qc +++ b/data/qcsrc/server/teamplay.qc @@ -246,7 +246,7 @@ void InitGameplayMode() ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER); // do not define SP_SCORE for LMS ScoreInfo_SetLabel_PlayerScore(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY); - ScoreInfo_SetLabel_PlayerScore(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_HIDE_ZERO | SFL_SORT_PRIO_PRIMARY); + ScoreInfo_SetLabel_PlayerScore(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_HIDE_ZERO | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE); } else if(game == GAME_ARENA || cvar("g_arena")) { -- 2.39.2