Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
scores.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IS_DECREASING(x)
#define IS_INCREASING(x)
#define MAX_SCORE   64
#define MAX_TEAMSCORE   2
#define REGISTER_SP(id)
#define scores(this)
#define scores_flags(this)
#define scores_label(this)
#define SFL_ZERO_IS_WORST   SFL_TIME
#define teamscores(i)
#define teamscores_flags(i)
#define teamscores_label(i)

Typedefs

using PlayerScoreField = entity
using ScoreTeam = string

Functions

 REGISTER_SP (ASSAULT_OBJECTIVES)
 REGISTER_SP (CTF_CAPS)
 REGISTER_SP (CTF_CAPTIME)
 REGISTER_SP (CTF_DROPS)
 REGISTER_SP (CTF_FCKILLS)
 REGISTER_SP (CTF_PICKUPS)
 REGISTER_SP (CTF_RETURNS)
 REGISTER_SP (DEATHS)
 REGISTER_SP (DMG)
 REGISTER_SP (DMGTAKEN)
 REGISTER_SP (DOM_TAKES)
 REGISTER_SP (DOM_TICKS)
 REGISTER_SP (END)
 REGISTER_SP (FPS)
 REGISTER_SP (FRAGS)
 REGISTER_SP (FREEZETAG_REVIVALS)
 REGISTER_SP (KDRATIO)
 REGISTER_SP (KEEPAWAY_BCTIME)
 REGISTER_SP (KEEPAWAY_CARRIERKILLS)
 REGISTER_SP (KEEPAWAY_PICKUPS)
 REGISTER_SP (KH_CAPS)
 REGISTER_SP (KH_DESTRUCTIONS)
 REGISTER_SP (KH_KCKILLS)
 REGISTER_SP (KH_LOSSES)
 REGISTER_SP (KH_PICKUPS)
 REGISTER_SP (KH_PUSHES)
 REGISTER_SP (KILLS)
 REGISTER_SP (LMS_LIVES)
 REGISTER_SP (LMS_RANK)
 REGISTER_SP (NAME)
 REGISTER_SP (NEXBALL_FAULTS)
 REGISTER_SP (NEXBALL_GOALS)
 REGISTER_SP (ONS_CAPS)
 REGISTER_SP (ONS_TAKES)
 REGISTER_SP (PING)
 REGISTER_SP (PL)
 REGISTER_SP (RACE_FASTEST)
 REGISTER_SP (RACE_LAPS)
 REGISTER_SP (RACE_TIME)
 REGISTER_SP (ROUNDS_PL)
 REGISTER_SP (SCORE)
 REGISTER_SP (SEPARATOR)
 REGISTER_SP (SKILL)
 REGISTER_SP (SUICIDES)
 REGISTER_SP (SUM)
 REGISTER_SP (SURV_HUNTS)
 REGISTER_SP (SURV_SURVIVALS)
 REGISTER_SP (TEAMKILLS)
 REGISTER_SP (TKA_BCTIME)
 REGISTER_SP (TKA_CARRIERKILLS)
 REGISTER_SP (TKA_PICKUPS)
 STATIC_INIT (Scores_renumber)

Variables

int _scores [MAX_SCORE]
int _teamscores [MAX_TEAMSCORE]
int _teamscores_flags [MAX_TEAMSCORE]
string _teamscores_label [MAX_TEAMSCORE]
int m_flags
string m_name
const int SFL_ALLOW_HIDE = BIT(4)
 Allow a column to be hidden (do not automatically add it even if it is a sorting key)
const int SFL_HIDE_ZERO = BIT(1)
 Don't show zero values as scores.
const int SFL_LOWER_IS_BETTER = BIT(0)
 Lower scores are better (e.g.
const int SFL_NOT_SORTABLE = BIT(7)
const int SFL_RANK = BIT(5)
 Display as a rank (with st, nd, rd, th suffix)
const int SFL_SORT_PRIO_MASK = SFL_SORT_PRIO_PRIMARY | SFL_SORT_PRIO_SECONDARY
const int SFL_SORT_PRIO_PRIMARY = BIT(3)
const int SFL_SORT_PRIO_SECONDARY = BIT(2)
 Scoring priority (NOTE: PRIMARY is used for fraglimit) NOTE: SFL_SORT_PRIO_SECONDARY value must be lower than SFL_SORT_PRIO_PRIMARY's.
const int SFL_TIME = BIT(6)
 Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!)
const int ST_SCORE = 0

Macro Definition Documentation

◆ IS_DECREASING

#define IS_DECREASING ( x)
Value:
( !((x) & SFL_LOWER_IS_BETTER) )
const int SFL_LOWER_IS_BETTER
Lower scores are better (e.g.
Definition scores.qh:102

Definition at line 138 of file scores.qh.

Referenced by Scoreboard_CompareScore().

◆ IS_INCREASING

#define IS_INCREASING ( x)
Value:

Definition at line 137 of file scores.qh.

Referenced by Scoreboard_CompareScore().

◆ MAX_SCORE

#define MAX_SCORE   64

Definition at line 3 of file scores.qh.

◆ MAX_TEAMSCORE

◆ REGISTER_SP

#define REGISTER_SP ( id)
Value:
entity PlayerScoreField
Definition scores.qh:140
int m_id
Definition effect.qh:19
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#define REGISTER(...)
Register a new entity with a registry.
Definition registry.qh:87

Definition at line 5 of file scores.qh.

◆ scores

#define scores ( this)
Value:
_scores[(this).m_id]
int _scores[MAX_SCORE]
Definition scores.qh:141

Definition at line 145 of file scores.qh.

Referenced by PlayerScore_Compare(), PlayerScore_SendEntity(), and ScoreInfo_SetLabel_PlayerScore().

◆ scores_flags

◆ scores_label

◆ SFL_ZERO_IS_WORST

#define SFL_ZERO_IS_WORST   SFL_TIME

◆ teamscores

#define teamscores ( i)
Value:
int _teamscores[MAX_TEAMSCORE]
Definition scores.qh:151

Definition at line 152 of file scores.qh.

Referenced by ScoreInfo_SetLabel_TeamScore(), TeamScore_Compare(), and TeamScore_SendEntity().

◆ teamscores_flags

◆ teamscores_label

Typedef Documentation

◆ PlayerScoreField

Definition at line 140 of file scores.qh.

◆ ScoreTeam

using ScoreTeam = string

Definition at line 150 of file scores.qh.

Function Documentation

◆ REGISTER_SP() [1/51]

REGISTER_SP ( ASSAULT_OBJECTIVES )

◆ REGISTER_SP() [2/51]

REGISTER_SP ( CTF_CAPS )

◆ REGISTER_SP() [3/51]

REGISTER_SP ( CTF_CAPTIME )

◆ REGISTER_SP() [4/51]

REGISTER_SP ( CTF_DROPS )

◆ REGISTER_SP() [5/51]

REGISTER_SP ( CTF_FCKILLS )

◆ REGISTER_SP() [6/51]

REGISTER_SP ( CTF_PICKUPS )

◆ REGISTER_SP() [7/51]

REGISTER_SP ( CTF_RETURNS )

◆ REGISTER_SP() [8/51]

REGISTER_SP ( DEATHS )

◆ REGISTER_SP() [9/51]

REGISTER_SP ( DMG )

◆ REGISTER_SP() [10/51]

REGISTER_SP ( DMGTAKEN )

◆ REGISTER_SP() [11/51]

REGISTER_SP ( DOM_TAKES )

◆ REGISTER_SP() [12/51]

REGISTER_SP ( DOM_TICKS )

◆ REGISTER_SP() [13/51]

REGISTER_SP ( END )

◆ REGISTER_SP() [14/51]

REGISTER_SP ( FPS )

◆ REGISTER_SP() [15/51]

REGISTER_SP ( FRAGS )

◆ REGISTER_SP() [16/51]

REGISTER_SP ( FREEZETAG_REVIVALS )

◆ REGISTER_SP() [17/51]

REGISTER_SP ( KDRATIO )

◆ REGISTER_SP() [18/51]

REGISTER_SP ( KEEPAWAY_BCTIME )

◆ REGISTER_SP() [19/51]

REGISTER_SP ( KEEPAWAY_CARRIERKILLS )

◆ REGISTER_SP() [20/51]

REGISTER_SP ( KEEPAWAY_PICKUPS )

◆ REGISTER_SP() [21/51]

REGISTER_SP ( KH_CAPS )

◆ REGISTER_SP() [22/51]

REGISTER_SP ( KH_DESTRUCTIONS )

◆ REGISTER_SP() [23/51]

REGISTER_SP ( KH_KCKILLS )

◆ REGISTER_SP() [24/51]

REGISTER_SP ( KH_LOSSES )

◆ REGISTER_SP() [25/51]

REGISTER_SP ( KH_PICKUPS )

◆ REGISTER_SP() [26/51]

REGISTER_SP ( KH_PUSHES )

◆ REGISTER_SP() [27/51]

REGISTER_SP ( KILLS )

◆ REGISTER_SP() [28/51]

REGISTER_SP ( LMS_LIVES )

◆ REGISTER_SP() [29/51]

REGISTER_SP ( LMS_RANK )

◆ REGISTER_SP() [30/51]

REGISTER_SP ( NAME )

◆ REGISTER_SP() [31/51]

REGISTER_SP ( NEXBALL_FAULTS )

◆ REGISTER_SP() [32/51]

REGISTER_SP ( NEXBALL_GOALS )

◆ REGISTER_SP() [33/51]

REGISTER_SP ( ONS_CAPS )

◆ REGISTER_SP() [34/51]

REGISTER_SP ( ONS_TAKES )

◆ REGISTER_SP() [35/51]

REGISTER_SP ( PING )

◆ REGISTER_SP() [36/51]

REGISTER_SP ( PL )

◆ REGISTER_SP() [37/51]

REGISTER_SP ( RACE_FASTEST )

◆ REGISTER_SP() [38/51]

REGISTER_SP ( RACE_LAPS )

◆ REGISTER_SP() [39/51]

REGISTER_SP ( RACE_TIME )

◆ REGISTER_SP() [40/51]

REGISTER_SP ( ROUNDS_PL )

◆ REGISTER_SP() [41/51]

REGISTER_SP ( SCORE )

◆ REGISTER_SP() [42/51]

REGISTER_SP ( SEPARATOR )

◆ REGISTER_SP() [43/51]

REGISTER_SP ( SKILL )

◆ REGISTER_SP() [44/51]

REGISTER_SP ( SUICIDES )

◆ REGISTER_SP() [45/51]

REGISTER_SP ( SUM )

◆ REGISTER_SP() [46/51]

REGISTER_SP ( SURV_HUNTS )

◆ REGISTER_SP() [47/51]

REGISTER_SP ( SURV_SURVIVALS )

◆ REGISTER_SP() [48/51]

REGISTER_SP ( TEAMKILLS )

◆ REGISTER_SP() [49/51]

REGISTER_SP ( TKA_BCTIME )

◆ REGISTER_SP() [50/51]

REGISTER_SP ( TKA_CARRIERKILLS )

◆ REGISTER_SP() [51/51]

REGISTER_SP ( TKA_PICKUPS )

◆ STATIC_INIT()

STATIC_INIT ( Scores_renumber )

Definition at line 13 of file scores.qh.

13{ FOREACH(Scores, true, it.m_id = i); }
#define FOREACH(list, cond, body)
Definition iter.qh:19

References FOREACH, and STATIC_INIT.

Variable Documentation

◆ _scores

int _scores[MAX_SCORE]

Definition at line 141 of file scores.qh.

◆ _teamscores

int _teamscores[MAX_TEAMSCORE]

Definition at line 151 of file scores.qh.

◆ _teamscores_flags

int _teamscores_flags[MAX_TEAMSCORE]

Definition at line 155 of file scores.qh.

◆ _teamscores_label

string _teamscores_label[MAX_TEAMSCORE]

Definition at line 153 of file scores.qh.

◆ m_flags

int m_flags

Definition at line 143 of file scores.qh.

◆ m_name

◆ SFL_ALLOW_HIDE

const int SFL_ALLOW_HIDE = BIT(4)

Allow a column to be hidden (do not automatically add it even if it is a sorting key)

Definition at line 112 of file scores.qh.

Referenced by Cmd_Scoreboard_SetFields(), and REGISTER_MUTATOR().

◆ SFL_HIDE_ZERO

const int SFL_HIDE_ZERO = BIT(1)

Don't show zero values as scores.

Definition at line 107 of file scores.qh.

Referenced by ScoreString().

◆ SFL_LOWER_IS_BETTER

◆ SFL_NOT_SORTABLE

const int SFL_NOT_SORTABLE = BIT(7)

Definition at line 124 of file scores.qh.

Referenced by Scoreboard_InitScores(), ScoreField_Compare(), and ScoreRules_basics().

◆ SFL_RANK

const int SFL_RANK = BIT(5)

Display as a rank (with st, nd, rd, th suffix)

Definition at line 117 of file scores.qh.

Referenced by REGISTER_MUTATOR(), and ScoreString().

◆ SFL_SORT_PRIO_MASK

◆ SFL_SORT_PRIO_PRIMARY

◆ SFL_SORT_PRIO_SECONDARY

const int SFL_SORT_PRIO_SECONDARY = BIT(2)

Scoring priority (NOTE: PRIMARY is used for fraglimit) NOTE: SFL_SORT_PRIO_SECONDARY value must be lower than SFL_SORT_PRIO_PRIMARY's.

Definition at line 133 of file scores.qh.

Referenced by ctf_ScoreRules(), cts_ScoreRules(), GetPlayerScoreString(), GetScoreLogLabel(), GetTeamScoreString(), kh_ScoreRules(), nb_ScoreRules(), ons_ScoreRules(), race_ScoreRules(), REGISTER_MUTATOR(), REGISTER_MUTATOR(), REGISTER_MUTATOR(), Score_NicePrint_ItemColor(), Scoreboard_InitScores(), ScoreInfo_SetLabel_PlayerScore(), and surv_Initialize().

◆ SFL_TIME

const int SFL_TIME = BIT(6)

Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!)

Definition at line 122 of file scores.qh.

Referenced by ctf_ScoreRules(), cts_ScoreRules(), HUD_Mod_Race(), HUD_Score(), race_ScoreRules(), and ScoreString().

◆ ST_SCORE

const int ST_SCORE = 0

Definition at line 158 of file scores.qh.

Referenced by ctf_Handle_Return(), dompointthink(), and ScoreRules_basics().