2 void CheckAllowedTeams (entity for_whom);
4 // NOTE: SP_ constants may not be >= MAX_SCORE; ST_constants may not be >= MAX_TEAMSCORE
5 // scores that should be in all modes:
6 void ScoreRules_basics(float teams, float sprio)
10 ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", sprio);
11 ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0);
12 ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER);
13 ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER);
15 ScoreInfo_SetLabel_PlayerScore(SP_SCORE, "score", sprio);
17 void ScoreRules_generic()
19 CheckAllowedTeams(world);
22 CheckAllowedTeams(world);
23 ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY);
26 ScoreRules_basics(0, SFL_SORT_PRIO_PRIMARY);
32 #define SP_CTF_PICKUPS 5
33 #define SP_CTF_FCKILLS 6
34 #define SP_CTF_RETURNS 7
37 float sp_score, sp_caps;
38 sp_score = sp_caps = 0;
39 switch(g_ctf_win_mode)
42 sp_caps = SFL_SORT_PRIO_PRIMARY;
44 case 1: // caps, then score
45 sp_caps = SFL_SORT_PRIO_PRIMARY;
46 sp_score = SFL_SORT_PRIO_SECONDARY;
49 sp_score = SFL_SORT_PRIO_PRIMARY;
50 sp_caps = SFL_SORT_PRIO_SECONDARY; // looks better ;)
54 CheckAllowedTeams(world);
55 ScoreRules_basics(2 + (c3>=0), sp_score); // NOTE this assumes that the rogue team is team 3
56 ScoreInfo_SetLabel_TeamScore (ST_CTF_CAPS, "caps", sp_caps);
57 ScoreInfo_SetLabel_PlayerScore(SP_CTF_CAPS, "caps", sp_caps);
58 ScoreInfo_SetLabel_PlayerScore(SP_CTF_PICKUPS, "pickups", 0);
59 ScoreInfo_SetLabel_PlayerScore(SP_CTF_FCKILLS, "fckills", 0);
60 ScoreInfo_SetLabel_PlayerScore(SP_CTF_RETURNS, "returns", 0);
64 #define ST_DOM_DOMPOINTS 1
65 #define SP_DOM_DOMPOINTS 4
68 #define SP_LMS_LIVES 4
72 ScoreRules_basics(0, 0);
73 ScoreInfo_SetLabel_PlayerScore(SP_LMS_LIVES, "lives", SFL_SORT_PRIO_SECONDARY);
74 ScoreInfo_SetLabel_PlayerScore(SP_LMS_RANK, "rank", SFL_LOWER_IS_BETTER | SFL_HIDE_ZERO | SFL_SORT_PRIO_PRIMARY | SFL_ALLOW_HIDE);
80 #define SP_KH_PUSHES 5
81 #define SP_KH_DESTROYS 6
82 #define SP_KH_PICKUPS 7
83 #define SP_KH_KCKILLS 8
84 #define SP_KH_LOSSES 9
85 void ScoreRules_kh(float teams)
87 ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY);
88 ScoreInfo_SetLabel_TeamScore (ST_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
89 ScoreInfo_SetLabel_PlayerScore(SP_KH_CAPS, "caps", SFL_SORT_PRIO_SECONDARY);
90 ScoreInfo_SetLabel_PlayerScore(SP_KH_PUSHES, "pushes", 0);
91 ScoreInfo_SetLabel_PlayerScore(SP_KH_DESTROYS, "destroyed", SFL_LOWER_IS_BETTER);
92 ScoreInfo_SetLabel_PlayerScore(SP_KH_PICKUPS, "pickups", 0);
93 ScoreInfo_SetLabel_PlayerScore(SP_KH_KCKILLS, "kckills", 0);
94 ScoreInfo_SetLabel_PlayerScore(SP_KH_LOSSES, "losses", SFL_LOWER_IS_BETTER);