Xonotic
sv_lms.qh
Go to the documentation of this file.
1 #pragma once
2 
4 #include <common/scores.qh>
5 
6 // 1 when player presses F3 to spectate for the first time (he only gets a warning)
7 // 2 when player goes spectator (presses F3 to spectate for the second time)
8 // 3 when player disconnects
10 
11 #define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
12 string autocvar_g_lms_weaponarena = "most_available";
13 
14 void lms_Initialize();
15 
16 REGISTER_MUTATOR(lms, false)
17 {
20  {
24  GameRules_scoring(0, 0, 0, {
25  field(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY);
26  field(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_RANK | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE);
27  });
28 
30  }
31  return 0;
32 }
33 
34 // lives related defs
36 int LMS_NewPlayerLives();
#define GameRules_scoring(teams, spprio, stprio, fields)
Definition: sv_rules.qh:53
#define MUTATOR_STATIC()
Definition: base.qh:288
int LMS_NewPlayerLives()
Definition: sv_lms.qc:17
const int SFL_SORT_PRIO_SECONDARY
Scoring priority (NOTE: PRIMARY is used for fraglimit)
Definition: scores.qh:126
void GameRules_limit_score(int limit)
Definition: sv_rules.qc:34
const int SFL_SORT_PRIO_PRIMARY
Definition: scores.qh:127
void lms_Initialize()
Definition: sv_lms.qc:531
void GameRules_score_enabled(bool value)
Disabling score disables the "score" column on the scoreboard.
Definition: sv_rules.qc:28
const int SFL_RANK
Display as a rank (with st, nd, rd, th suffix)
Definition: scores.qh:113
const int SFL_LOWER_IS_BETTER
Lower scores are better (e.g.
Definition: scores.qh:98
int lms_spectate_warning
Definition: sv_lms.qh:9
#define autocvar_g_lms_lives_override
Definition: sv_lms.qh:11
int lms_lowest_lives
Definition: sv_lms.qh:35
void GameRules_limit_lead(int limit)
Definition: sv_rules.qc:44
string autocvar_g_lms_weaponarena
Definition: sv_lms.qh:12
REGISTER_MUTATOR(lms, false)
Definition: sv_lms.qh:16
#define MUTATOR_ONADD
Definition: base.qh:284
const int SFL_ALLOW_HIDE
Allow a column to be hidden (do not automatically add it even if it is a sorting key) ...
Definition: scores.qh:108