1 #include "scores_rules.qh"
3 #include "cl_client.qh"
6 void CheckAllowedTeams (entity for_whom);
8 // NOTE: SP_ constants may not be >= MAX_SCORE; ST_constants may not be >= MAX_TEAMSCORE
9 // scores that should be in all modes:
10 float ScoreRules_teams;
11 void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabled)
14 for(i = 0; i < MAX_SCORE; ++i)
15 ScoreInfo_SetLabel_PlayerScore(i, "", 0);
16 for(i = 0; i < MAX_TEAMSCORE; ++i)
17 ScoreInfo_SetLabel_TeamScore(i, "", 0);
19 ScoreRules_teams = teams;
22 ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", stprio);
24 if (!INDEPENDENT_PLAYERS)
25 ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0);
27 ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER);
29 if (!INDEPENDENT_PLAYERS)
30 ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER);
33 ScoreInfo_SetLabel_PlayerScore(SP_SCORE, "score", sprio);
35 ScoreInfo_SetLabel_PlayerScore(SP_DMG, "damage", 0);
36 ScoreInfo_SetLabel_PlayerScore(SP_DMGTAKEN, "damagetaken", SFL_LOWER_IS_BETTER);
38 void ScoreRules_basics_end()
40 ScoreInfo_Init(ScoreRules_teams);
42 void ScoreRules_generic()
46 CheckAllowedTeams(NULL);
47 ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true);
50 ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, true);
51 ScoreRules_basics_end();